Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 3 commits
  • 7 files changed
  • 0 commit comments
  • 1 contributor
View
5 ExapusRAP/src/exapus/gui/ExapusWorkbenchAdvisor.java
@@ -8,8 +8,9 @@
public void initialize(IWorkbenchConfigurer configurer) {
- Store.getCurrent().populateWorkspaceModel();
-
+ Store store = Store.getCurrent();
+ store.registerViews();
+ store.populateWorkspaceModel();
getWorkbenchConfigurer().setSaveAndRestore(false);
super.initialize(configurer);
View
97 ExapusRAP/src/exapus/gui/editors/view/definition/ViewDefinitionEditor.java
@@ -90,7 +90,6 @@ public void createPartControl(Composite parent) {
comboVWPerspective = new ComboViewer(parent, SWT.READ_ONLY);
comboVWPerspective.getCombo().setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
comboVWPerspective.setContentProvider(ArrayContentProvider.getInstance());
- comboVWPerspective.setInput(Perspective.supportedPerspectives());
comboVWPerspective.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
@@ -127,52 +126,7 @@ public void selectionChanged(SelectionChangedEvent event) {
}
});
-
-
-
- //Renderable
- Label lblRenderable = new Label(parent, SWT.NONE);
- GridData gd_lblRenderable = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
- lblRenderable.setLayoutData(gd_lblRenderable);
-
- checkRenderable = new Button(parent, SWT.CHECK);
- GridData gd_checkRenderable = new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1);
- checkRenderable.setLayoutData(gd_checkRenderable);
- checkRenderable.setText("Render as graph.");
-
- checkRenderable.addSelectionListener(new SelectionListener() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- getView().setRenderable(checkRenderable.getSelection());
- comboMetrics.setInput(MetricType.supportedMetrics(checkRenderable.getSelection()));
- comboMetrics.setSelection(new StructuredSelection(MetricType.defaultValue(checkRenderable.getSelection())));
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- });
-
- //Graph details
- Label lblGraphDetails = new Label(parent, SWT.NONE);
- lblGraphDetails.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
- lblGraphDetails.setText("Graph details:");
-
- comboGraphDetails = new ComboViewer(parent, SWT.READ_ONLY);
- comboGraphDetails.getCombo().setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
- comboGraphDetails.setContentProvider(ArrayContentProvider.getInstance());
- comboGraphDetails.setInput(GraphDetails.supportedDetails());
- comboGraphDetails.addSelectionChangedListener(new ISelectionChangedListener() {
- @Override
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection selection = (IStructuredSelection) event.getSelection();
- Object selected = selection.getFirstElement();
- if (selected instanceof GraphDetails) {
- getView().setGraphDetails((GraphDetails) selected);
- }
- }
- });
-
+
//APIs
Label lblAPILabel = new Label(parent, SWT.NONE);
lblAPILabel.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
@@ -199,7 +153,6 @@ public void selectionChanged(SelectionChangedEvent event) {
comboMetrics = new ComboViewer(parent, SWT.READ_ONLY);
comboMetrics.getCombo().setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
comboMetrics.setContentProvider(ArrayContentProvider.getInstance());
- comboMetrics.setInput(MetricType.supportedMetrics(checkRenderable.getSelection()));
comboMetrics.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
@@ -210,6 +163,54 @@ public void selectionChanged(SelectionChangedEvent event) {
}
}
});
+
+ //Graph details
+ Label lblGraphDetails = new Label(parent, SWT.NONE);
+ lblGraphDetails.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
+ lblGraphDetails.setText("Graph details:");
+
+ comboGraphDetails = new ComboViewer(parent, SWT.READ_ONLY);
+ comboGraphDetails.getCombo().setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
+ comboGraphDetails.setContentProvider(ArrayContentProvider.getInstance());
+ comboGraphDetails.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ IStructuredSelection selection = (IStructuredSelection) event.getSelection();
+ Object selected = selection.getFirstElement();
+ if (selected instanceof GraphDetails) {
+ getView().setGraphDetails((GraphDetails) selected);
+ }
+ }
+ });
+
+ //Renderable
+ Label lblRenderable = new Label(parent, SWT.NONE);
+ GridData gd_lblRenderable = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
+ lblRenderable.setLayoutData(gd_lblRenderable);
+
+ checkRenderable = new Button(parent, SWT.CHECK);
+ GridData gd_checkRenderable = new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1);
+ checkRenderable.setLayoutData(gd_checkRenderable);
+ checkRenderable.setText("Render as graph.");
+
+ checkRenderable.addSelectionListener(new SelectionListener() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ getView().setRenderable(checkRenderable.getSelection());
+ comboMetrics.setInput(MetricType.supportedMetrics(checkRenderable.getSelection()));
+ comboMetrics.setSelection(new StructuredSelection(MetricType.defaultValue(checkRenderable.getSelection())));
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ comboVWPerspective.setInput(Perspective.supportedPerspectives());
+ comboGraphDetails.setInput(GraphDetails.supportedDetails());
+ comboMetrics.setInput(MetricType.supportedMetrics(checkRenderable.getSelection()));
+
+
}
private void configureSelectionTableAndToolBar(final TableViewer tableVW, ToolBar toolbar, final Perspective perspective) {
View
7 ExapusRAP/src/exapus/model/store/Store.java
@@ -35,8 +35,6 @@ public static Store getCurrent() {
private Store() {
registry = new HashMap<String, View>();
workspaceModel = null;
- registerDefaultViews();
- registerCustomViews();
}
@@ -95,6 +93,11 @@ public boolean hasRegisteredView(String name) {
return registry.containsKey(name);
}
+ public void registerViews() {
+ registerDefaultViews();
+ registerCustomViews();
+ }
+
protected void registerDefaultViews() {
registerView(ViewFactory.getCurrent().completePackageView());
View
12 ExapusRAP/src/exapus/model/view/ScopedSelection.java
@@ -9,11 +9,17 @@
public class ScopedSelection extends Selection {
- public ScopedSelection(QName name, Scope scope) {
+ public ScopedSelection(QName name, Scope scope, String tag) {
super();
this.name = name;
this.scope = scope;
+ this.tag = tag;
+ }
+
+ public ScopedSelection(QName name, Scope scope) {
+ this(name,scope,null);
}
+
public ScopedSelection(QName name) {
this(name, Scope.PREFIX_SCOPE);
@@ -167,10 +173,6 @@ public String getScopeString() {
public String getTagString() {
return (hasTag() ? getTag() : "");
}
-
-
-
-
}
View
7 ExapusRAP/src/exapus/model/view/View.java
@@ -112,6 +112,13 @@ public boolean removeProjectSelection(Selection selection) {
protected void makeDirty() {
forest = null;
graph = null;
+ makeDependentViewsDirty();
+ }
+
+ protected void makeDependentViewsDirty() {
+ for(View v : Store.getCurrent().getRegisteredViews())
+ if(name.equals(v.getSourceViewName()))
+ v.makeDirty();
}
public String getName() {
View
3 ExapusRAP/src/exapus/model/view/ViewFactory.java
@@ -91,7 +91,8 @@ public View testProjectCentricSelectionView() {
public View testAPITagSelectionView() {
View view = new View("API tag selection test", Perspective.API_CENTRIC);
view.addProjectSelection(UniversalSelection.getCurrent());
- view.addAPISelection(new ScopedSelection(new QName("ant"), Scope.ROOT_SCOPE));
+ view.addAPISelection(new ScopedSelection(new QName("ant"), Scope.ROOT_SCOPE));
+ view.addAPISelection(new ScopedSelection(new QName("annotation"), Scope.ROOT_SCOPE, "annotation"));
view.setSourceViewName(TAGGED_API_VIEW_NAME);
return view;
}
View
1 ExapusRAP/src/exapus/model/view/evaluator/ProjectCentricEvaluator.java
@@ -19,7 +19,6 @@ protected ProjectCentricEvaluator(View v) {
protected ICopyingForestVisitor newVisitor() {
return new ProjectCentricSelectionVisitor(getView().getProjectSelections(), getView().getAPISelections());
}
-
@Override
protected FactForest getCompleteForest() {

No commit comments for this range

Something went wrong with that request. Please try again.