to avoid to add and import manually for each class , I would like to add import com.soft.dor.file ; to all java classes available in a package package1.
Is there a way from ecplise java ?
thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assume that you want to add
import com.soft.dor.file ;to all java classes in a pacakge calledpackage1.Proceed as follows :
First select the package
package1in Package Explorer.Then, press Ctrl + H and click on the
File Searchtab.There change the settings like so :
Select the
Selected resourcesradioSelect :
Regular expressioncheckboxIn
Containing texttypepackage package1;In
File name patterns:*.javaClick on
Replace.In the ‘Replace Text Matches’ that appears, in the
With:field type :package package1;\r\n\r\nimport com.soft.dor.file ;Press OK or Preview