Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 20:48 Go to next message
Subhadeep Bose is currently offline Subhadeep Bose
Messages: 3
Registered: March 2012
Junior Member
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 14:43 Go to previous message
Grant Gayed is currently offline Grant Gayed
Messages: 2151
Registered: July 2009
Senior Member
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 Oct 22 22:37:01 GMT 2014

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

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