Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to select all files of a particular type in the included jar using Eclipse SWT(How to select all files of a particular type in the included jar using Eclipse SWT)
How to select all files of a particular type in the included jar using Eclipse SWT [message #833644] Sat, 31 March 2012 16:48 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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();
>
>
Previous Topic:How to change row layout structure based on radio button in Eclipse SWT
Next Topic:SWT Browser and IE Extensions
Goto Forum:
  


Current Time: Wed Jul 23 13:17:39 EDT 2025

Powered by FUDForum. Page generated in 0.02752 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top