Significant improvements to AXF and AGF UI. Agent Navigator now works well, with full support for synchronized selections. New Info View supports HTML text to explain models. (Eventually that should move to axf, but it's in Escape now for dependency and configuratin reasons.)
diff --git a/org.eclipse.amp.escape/plugins/org.eclipse.amp.escape.ascape/src/org/ascape/view/vis/TreeView.java b/org.eclipse.amp.escape/plugins/org.eclipse.amp.escape.ascape/src/org/ascape/view/vis/TreeView.java
deleted file mode 100644
index d356770..0000000
--- a/org.eclipse.amp.escape/plugins/org.eclipse.amp.escape.ascape/src/org/ascape/view/vis/TreeView.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Metascape LLC, Miles Parker.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Miles Parker - initial API and implementation
- ******************************************************************************/
-package org.ascape.view.vis;
-
-import org.eclipse.amp.axf.core.IModel;
-import org.eclipse.amp.axf.core.IObservationProvider;
-import org.eclipse.amp.axf.ide.AXFWorkbenchPlugin;
-import org.eclipse.amp.escape.ascape.view.EditPartFactoryScapeView;
-
-public class TreeView extends EditPartFactoryScapeView {
- private static final long serialVersionUID = 1L;
-
- public TreeView() {
- super("org.eclipse.amp.view.TreeView", null, "Tree View");
- }
-
- public Object getAdapter(Class key) {
- if (key == IModel.class) {
- IObservationProvider model = (IObservationProvider) AXFWorkbenchPlugin.getDefault().getManager().getAdapter(getScape().getRoot(), IModel.class);
- return model;
- }
- return null;
- }
-}
diff --git a/org.eclipse.amp.escape/plugins/org.eclipse.amp.escape.ascape/src/org/eclipse/amp/escape/ascape/adapt/AscapePartFactory.java b/org.eclipse.amp.escape/plugins/org.eclipse.amp.escape.ascape/src/org/eclipse/amp/escape/ascape/adapt/AscapePartFactory.java
index 0cca869..cf5f6cb 100644
--- a/org.eclipse.amp.escape/plugins/org.eclipse.amp.escape.ascape/src/org/eclipse/amp/escape/ascape/adapt/AscapePartFactory.java
+++ b/org.eclipse.amp.escape/plugins/org.eclipse.amp.escape.ascape/src/org/eclipse/amp/escape/ascape/adapt/AscapePartFactory.java
@@ -86,8 +86,9 @@
} else if (model instanceof NetworkConnection) {
return new AgentConnectionPart();
} else {
- throw new RuntimeException("No part for the model: " + model
- + (model != null ? "[" + model.getClass() + "]" : ""));
+ return null;
+ // throw new RuntimeException("No part for the model: " + model
+ // + (model != null ? "[" + model.getClass() + "]" : ""));
}
}
diff --git a/org.eclipse.amp.escape/plugins/org.eclipse.amp.escape.ascape/src/org/eclipse/amp/escape/ascape/adapt/AscapePartTreeFactory.java b/org.eclipse.amp.escape/plugins/org.eclipse.amp.escape.ascape/src/org/eclipse/amp/escape/ascape/adapt/AscapePartTreeFactory.java
index e6937a2..3023d52 100644
--- a/org.eclipse.amp.escape/plugins/org.eclipse.amp.escape.ascape/src/org/eclipse/amp/escape/ascape/adapt/AscapePartTreeFactory.java
+++ b/org.eclipse.amp.escape/plugins/org.eclipse.amp.escape.ascape/src/org/eclipse/amp/escape/ascape/adapt/AscapePartTreeFactory.java
@@ -62,8 +62,9 @@
} else if (model instanceof Agent) {
return new AgentTreePart(provider);
} else {
- throw new RuntimeException("No part for the model: " + model
- + (model != null ? "[" + model.getClass() + "]" : ""));
+ return null;
+ // throw new RuntimeException("No part for the model: " + model
+ // + (model != null ? "[" + model.getClass() + "]" : ""));
}
}
}
diff --git a/org.eclipse.amp.escape/plugins/org.eclipse.amp.escape.ascape/src/org/eclipse/amp/escape/ascape/adapt/AscapeProvider.java b/org.eclipse.amp.escape/plugins/org.eclipse.amp.escape.ascape/src/org/eclipse/amp/escape/ascape/adapt/AscapeProvider.java
index 42efade..28808ea 100644
--- a/org.eclipse.amp.escape/plugins/org.eclipse.amp.escape.ascape/src/org/eclipse/amp/escape/ascape/adapt/AscapeProvider.java
+++ b/org.eclipse.amp.escape/plugins/org.eclipse.amp.escape.ascape/src/org/eclipse/amp/escape/ascape/adapt/AscapeProvider.java
@@ -96,19 +96,24 @@
* @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
*/
public String getText(Object element) {
+ String text = null;
if (element instanceof ScapeWrapperModel) {
- return getText(((ScapeWrapperModel) element).getScape());
+ text = getText(((ScapeWrapperModel) element).getScape());
}
if (element instanceof AscapeObject) {
- return ((AscapeObject) element).getName();
+ text = ((AscapeObject) element).getName();
}
if (element instanceof ScapeListener) {
- return ((ScapeListener) element).getName();
+ text = ((ScapeListener) element).getName();
}
if (element instanceof ScapeWrapperModelListener) {
- return getText(((ScapeWrapperModelListener) element).getWrapped());
+ text = getText(((ScapeWrapperModelListener) element).getWrapped());
}
- return null;
+ // Text can't be null for some cases..
+ if (text == null) {
+ text = element.getClass().getSimpleName();
+ }
+ return text;
}
/**