Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » IWorkbenchPage.getAggregateWorkingSet() has no visibility into JDT's WorkingSetModel.getAllWorkingSe
IWorkbenchPage.getAggregateWorkingSet() has no visibility into JDT's WorkingSetModel.getAllWorkingSe [message #323797] Wed, 09 January 2008 00:59
Nicolas Rouquette is currently offline Nicolas RouquetteFriend
Messages: 157
Registered: July 2009
Senior Member
In Eclipse 3.2.2, JDT has the following:

package org.eclipse.jdt.internal.ui.workingsets;
import org.eclipse.ui.IWorkingSet;
....

public class WorkingSetModel {
public void addPropertyChangeListener(...) { ... }
public IWorkingSet[] getAllWorkingSets() { ... }
...
}

There is a strange paradox where, in the plug-in perspective
with several working sets defines, we have the following behavior:

IWorkbench wb=PlatformUI.getWorkbench();

IWorkbenchWindow ww=wb.getActiveWorkbenchWindow();
IWorkbenchPage wp=ww.getActivePage();
IWorkingSet agg=wp.getAggregateWorkingSet();

// counter-intuitive:
// agg.isEmpty() == true;

IWorkingSet[] aws = wb.getWorkingSetManager().getAllWorkingSets();

// expected:
// aws.length > 0

Is this intended behavior?

This behavior seems to have some relevance to the following bugs:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=137396
https://bugs.eclipse.org/bugs/show_bug.cgi?id=182978

There are 31 currently pending bugs involving working sets and I didn't
have the time to search through all of them to tell if this is a
duplicate or not.

https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advan ced&short_desc_type=allwordssubstr&short_desc=Workin gSet&classification=Eclipse&version=3.2.2&versio n=3.3&version=3.3.1&version=3.4&long_desc_type=a llwordssubstr&long_desc=&bug_file_loc_type=allwordss ubstr&bug_file_loc=&status_whiteboard_type=allwordss ubstr&status_whiteboard=&keywords_type=allwords& keywords=&bug_status=UNCONFIRMED&bug_status=NEW& bug_status=ASSIGNED&bug_status=REOPENED&emailtype1=s ubstring&email1=&emailtype2=substring&email2=&am p;bugidtype=include&bug_id=&votes=&chfieldfrom=& amp;chfieldto=Now&chfieldvalue=&cmdtype=doit&ord er=Reuse+same+sort+as+last+time&field0-0-0=noop&type 0-0-0=noop&value0-0-0=


As far as the Eclispe 3.2.2 APIs are concerned, it seems to me that
the biggest hurdle against unified access to working sets comes from
the disconnected management of IWorkingSetManager instances which do
not know about each other and do not have peer-level access to
IWorkingSet instances.

Between JDT and the workbench, we have at least 2 distinct
IWorkingSetManager objects:

- JDT's WorkingSetModel.fLocalWorkingSetManager
- IWorkbenchWindow.getWorkingSetManager()

and a pseudo working set manager in each workbench page:

IWorkingSet[] IWorkbenchPage.getAggregateWorkingSet();

It seems to me that there is insufficient protocol-level coordination
and object-level awareness to ensure uniform access to working sets.

Does this characterize the underlying issue behind the confusing
behavior described above or have I missed something?

-- Nicolas.
Previous Topic:Remote Workspace
Next Topic:how to display text and image in JFace/SWT combo box.
Goto Forum:
  


Current Time: Sat Dec 21 15:03:45 GMT 2024

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

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

Back to the top