Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Navigating between Property Pages with a Link
Navigating between Property Pages with a Link [message #287401] Wed, 29 June 2005 11:39 Go to next message
Eclipse User
Originally posted by: mark_melvin.amis.com

Hi there,

I am trying madly to finish a feature today, and I wanted to be able to
switch PropertyPages in my Project's properties dialog, using a Link. I
have done this with my preference pages and it is very useful and
user-friendly. However, I cannot see how to do this in a PropertyDialog
without using a discouraged, internal class.

I have a subclass of PropertyPage, so here is what I tried to do:

final Link link= new Link(composite, SWT.NONE);
final String target=
" org.eclipse.ui.externaltools.propertypages.BuilderPropertyPa ge ";
//$NON-NLS-1$
link.setText("<a>ShowMe1</a>"); //$NON-NLS-1$
link.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
PreferencesUtil.createPropertyDialogOn(getShell(),
getProject(), target, null, null);
}
});

But this does nothing. It appears that this method is not smart enough
to re-use the current PropertyDilaog (the way
PreferencesUtil#createPreferenceDialogOn works).

So, I managed to switch pages by making my selection listener do the
following:

public void widgetSelected(SelectionEvent e) {
if (getContainer() instanceof PropertyDialog) {
((PropertyDialog) getContainer()).setCurrentPageId(target);
}
}

This works, however, PropertyDialog is internal, and I get warnings. I
can't see any other way to do this. Hopefully I am missing something??

Thanks,
Mark.
Re: Navigating between Property Pages with a Link [message #1153164 is a reply to message #287401] Thu, 24 October 2013 08:25 Go to previous message
Rasmi R is currently offline Rasmi R
Messages: 1
Registered: October 2013
Junior Member
Hi,

I am facing with a similar issue.
Can anyone help out.
Previous Topic:How do I hide Eclipse until application is initialized, including UI?
Next Topic:Application works using "Debug As", But fails using "Run As"
Goto Forum:
  


Current Time: Tue Jul 29 23:14:20 EDT 2014

Powered by FUDForum. Page generated in 0.15617 seconds