Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » treeviewer prob,eclipse rcp,juno(treeviewer prob,eclipse rcp,juno)
treeviewer prob,eclipse rcp,juno [message #936875] Mon, 08 October 2012 08:37 Go to next message
RP Mar is currently offline RP Mar
Messages: 68
Registered: August 2012
Member
I have a view in that it contains a treeviewer, Failed to create the part's controls.

I'm working with eclipse, it's an RCP application,Juno

java.lang.NullPointerException
at esc_configurator_tool.FileNameMockModel.FileDatNamesList(FileNameMockModel.java:56)
at esc_configurator_tool.FileNameMockModel.getCategories(FileNameMockModel.java:21)
at esc_configurator_tool.FileNameContentProvider.getElements(FileNameContentProvider.java:24)
-----------
ExplorerView.java

public void createPartControl(Composite parent) {
// TODO Auto-generated method stub
viewer = new TreeViewer(parent);
makeAction();
}

private void makeAction() {
viewer.setContentProvider(new FileNameContentProvider());
viewer.setLabelProvider(new FileNameLabelProvider());
FileNameMockModel fileNames = ObjectFactory.commonObject.getFileNameObject();
viewer.setInput(fileNames);
getSite().setSelectionProvider(viewer);
IWorkbenchPage page = Workbench.getInstance().getActiveWorkbenchWindow().getActivePage();
try {
page.showView(View.ID);
} catch (PartInitException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}

final MenuManager mgr = new MenuManager();

.....................................................
FileNameMockModel.java

public List<String> FileDatNamesList(){
List<String> datFilname = new ArrayList<String>();

File folder = new File(Constants.INSTANCE.getDirectory());
File[] listOfFiles = folder.listFiles();

for (int i = 0; i < listOfFiles.length; i++) {
if (listOfFiles[i].isFile()) {
datFilname.add(listOfFiles[i].getName());
}
}
return datFilname;
}
Re: treeviewer prob,eclipse rcp,juno [message #936891 is a reply to message #936875] Mon, 08 October 2012 08:55 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot Cela
Messages: 589
Registered: December 2010
Senior Member

This is a forum specific to Eclipse 4 applications, using the Eclipse 4 application platform and related modules.
Re: treeviewer prob,eclipse rcp,juno [message #937041 is a reply to message #936891] Mon, 08 October 2012 11:51 Go to previous messageGo to next message
RP Mar is currently offline RP Mar
Messages: 68
Registered: August 2012
Member
Please my application related to Eclipse 4 application
Re: treeviewer prob,eclipse rcp,juno [message #937771 is a reply to message #937041] Tue, 09 October 2012 04:41 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot Cela
Messages: 589
Registered: December 2010
Senior Member

How is it related?
Re: treeviewer prob,eclipse rcp,juno [message #938676 is a reply to message #937771] Wed, 10 October 2012 00:03 Go to previous message
RP Mar is currently offline RP Mar
Messages: 68
Registered: August 2012
Member
Please eclipse juno ide and I include all the plug-ins Eclipse 4 applications.
Previous Topic:How to add a view to the Eclipse Platform SDK
Next Topic:Core Expression Definition null/exists check?
Goto Forum:
  


Current Time: Wed Apr 16 12:19:10 EDT 2014

Powered by FUDForum. Page generated in 0.03550 seconds