Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » add a new page
add a new page [message #221021] Thu, 12 July 2007 09:11 Go to next message
Eclipse UserFriend
Originally posted by: karl.lindsten.com

I have a treeview with some elements in it. When I doubleclick one an
element I want a new page to open with some information about the element.
I have seen that the class IWizard have addPage() and I have looked at
some examples, but it feels like the wizard shouldn't be used when you
doubleclick on the element. Someone know about another way to do this?
Re: add a new page [message #221053 is a reply to message #221021] Thu, 12 July 2007 09:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jakub.jurkiewicz.gmail.com

Hi,

You can allow user to select some entries in the treeview and make him
click Next button wizard to go to the next page.

--
Jakub Jurkiewicz
http://eclipser-blog.blogspot.com/

aracruz wrote::
> I have a treeview with some elements in it. When I doubleclick one an
> element I want a new page to open with some information about the
> element. I have seen that the class IWizard have addPage() and I have
> looked at some examples, but it feels like the wizard shouldn't be used
> when you doubleclick on the element. Someone know about another way to
> do this?
>
Re: add a new page [message #221075 is a reply to message #221053] Thu, 12 July 2007 11:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: karl.lindsten.com

Thanks Jakub...

The thing is that I don't want a wizard. The treeview is like the package
explorer and when you choose a file there, for example a javafile, an new
page with a javaeditor opens. That is what I want to do. But with some
other information in the file.
Re: add a new page [message #221082 is a reply to message #221075] Thu, 12 July 2007 12:07 Go to previous messageGo to next message
Remy Suen is currently offline Remy SuenFriend
Messages: 462
Registered: July 2009
Senior Member
aracruz wrote:
> The thing is that I don't want a wizard. The treeview is like the
> package explorer and when you choose a file there, for example a
> javafile, an new page with a javaeditor opens. That is what I want to
> do. But with some other information in the file.

So basically, you want to create your own editor for the selected item?

Regards,
Rem
Re: add a new page [message #221089 is a reply to message #221082] Thu, 12 July 2007 12:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: karl.lindsten.com

yeah maybe that... but I don't se how the step going to happen. Assume I
have a treeview with textfiles and when I doubleclick on an textfile I
want a texteditor .

/**
* Here is my my action for the doubleklick now I want a an text edit open
the
* text file.
*/
doubleClickAction = new Action() {
public void run() {
ISelection selection = viewer.getSelection();
Object obj =
((IStructuredSelection)selection).getFirstElement();
System.out.println("trying to make document");
...
Re: add a new page [message #221096 is a reply to message #221089] Thu, 12 July 2007 12:35 Go to previous messageGo to next message
Remy Suen is currently offline Remy SuenFriend
Messages: 462
Registered: July 2009
Senior Member
aracruz wrote:
> yeah maybe that... but I don't se how the step going to happen. Assume I
> have a treeview with textfiles and when I doubleclick on an textfile I
> want a texteditor .

This is one way of doing things, once you retrieve the IFile from the
current selection.
http://wiki.eclipse.org/FAQ_How_do_I_open_an_editor_programm atically%3F

Regards,
Rem
Re: add a new page [message #221104 is a reply to message #221096] Thu, 12 July 2007 13:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: karl.lindsten.com

Thanks a lot for the help.

For some reason I don't have org.eclipse.ui.part.FileEditorInput. Where
can I get it?
Re: add a new page [message #221112 is a reply to message #221104] Thu, 12 July 2007 13:32 Go to previous messageGo to next message
Remy Suen is currently offline Remy SuenFriend
Messages: 462
Registered: July 2009
Senior Member
aracruz wrote:
> For some reason I don't have org.eclipse.ui.part.FileEditorInput. Where
> can I get it?

See here.
http://wiki.eclipse.org/FAQ_How_do_I_find_a_particular_class _from_an_Eclipse_plug-in%3F
Re: add a new page [message #221119 is a reply to message #221112] Thu, 12 July 2007 13:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: karl.lindsten.com

Okey I have opened the class but how does my javafile to know about it?
Re: add a new page [message #221125 is a reply to message #221119] Thu, 12 July 2007 13:53 Go to previous messageGo to next message
Remy Suen is currently offline Remy SuenFriend
Messages: 462
Registered: July 2009
Senior Member
aracruz wrote:
> Okey I have opened the class but how does my javafile to know about it?

I don't understand. Can you elaborate on your question and provide more
context. How does your java file know about 'what'? What is 'it'?

Regards,
Rem
Re: add a new page [message #221132 is a reply to message #221125] Thu, 12 July 2007 13:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: karl.lindsten.com

sorry. I'm writing in a javafile and trying to use FileEditorInput, but
got the errormessage cannot be resolved to a type. I have tried to import
org.eclipse.ui.part.FileEditorInput but then I get that that cant be
resolved. When I fellowed the link you send me I could open the type
FileEditorInput but my javafile cannot find it.
Re: add a new page [message #221147 is a reply to message #221132] Thu, 12 July 2007 14:33 Go to previous message
Eclipse UserFriend
Originally posted by: karl.lindsten.com

Nevermind I found an uglyway to do it.
Previous Topic:Infocenter - Indexing remote content for search
Next Topic:eclipse classic? WTP?
Goto Forum:
  


Current Time: Fri Apr 26 18:28:43 GMT 2024

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

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

Back to the top