How to select all files of a particular type in the included jar using Eclipse SWT [message #833644] |
Sat, 31 March 2012 16:48  |
Eclipse User |
|
|
|
I generally use OpenTypeSelectionDialog to display all the available .java files in the included jars . My problem is that I only need to display .txt/.properties file in the included jars as well as the workspace. Can someone help me out with this one(how to filter .txt or .properties for looking into included jars). Code for Displaying the Class Files:-
Shell sParent = JavaPlugin
.getActiveWorkbenchShell();
SelectionDialog dialog = new OpenTypeSelectionDialog(
sParent, true, PlatformUI
.getWorkbench()
.getProgressService(),
null, IJavaSearchConstants.TYPE);
dialog
.setTitle(JavaUIMessages.OpenTypeAction_dialogTitle);
dialog
.setMessage(JavaUIMessages.OpenTypeAction_dialogMessage);
int result = dialog.open();
Object[] abc = dialog.getResult();
BinaryType binayType = (BinaryType) abc[0];
String elementName = binayType
.getElementName();
IPackageFragment packageName = binayType
.getPackageFragment();
String name = packageName.getElementName();
|
|
|
Re: How to select all files of a particular type in the included jar using Eclipse SWT [message #836492 is a reply to message #833644] |
Wed, 04 April 2012 10:43  |
Eclipse User |
|
|
|
You should re-ask this question and the one regarding traversing pages
in a wizard in the appropriate forums. For JFace questions use
http://www.eclipse.org/forums/index.php/f/15/ , and for questions above
the level of jface use http://www.eclipse.org/forums/index.php/f/11/ .
Grant
On 3/31/2012 4:48 PM, Subhadeep Bose wrote:
> I generally use OpenTypeSelectionDialog to display all the available
> .java files in the included jars . My problem is that I only need to
> display .txt/.properties file in the included jars as well as the
> workspace. Can someone help me out with this one(how to filter .txt or
> .properties for looking into included jars). Code for Displaying the
> Class Files:-
> Shell sParent = JavaPlugin
> .getActiveWorkbenchShell();
> SelectionDialog dialog = new OpenTypeSelectionDialog(
> sParent, true, PlatformUI
> .getWorkbench()
> .getProgressService(),
> null, IJavaSearchConstants.TYPE);
> dialog
> .setTitle(JavaUIMessages.OpenTypeAction_dialogTitle);
> dialog
> .setMessage(JavaUIMessages.OpenTypeAction_dialogMessage);
> int result = dialog.open();
> Object[] abc = dialog.getResult();
> BinaryType binayType = (BinaryType) abc[0];
>
> String elementName = binayType
> .getElementName();
>
> IPackageFragment packageName = binayType
> .getPackageFragment();
> String name = packageName.getElementName();
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03359 seconds