Skip to content
Snippets Groups Projects
Commit 0644a658 authored by Florian Hölzl's avatar Florian Hölzl
Browse files

Completed prototype service introspection UI.

refs 2460
parent 766b6c47
No related branches found
No related tags found
No related merge requests found
......@@ -23,8 +23,8 @@ import org.fortiss.tooling.kernel.introspection.IIntrospectionDetailsItem;
import org.fortiss.tooling.kernel.introspection.IIntrospectionItem;
import org.fortiss.tooling.kernel.introspection.items.ConstraintCheckerServiceIntrospectionDetailsItem;
import org.fortiss.tooling.kernel.introspection.items.PrototypeServiceIntrospectionDetailsItem;
import org.fortiss.tooling.kernel.ui.internal.introspection.details.factories.ConstraintCheckerServiceIntrospectionDetailsUIHandler;
import org.fortiss.tooling.kernel.ui.internal.introspection.details.factories.PrototypeServiceIntrospectionDetailsUIHandler;
import org.fortiss.tooling.kernel.ui.internal.introspection.details.handler.ConstraintCheckerServiceIntrospectionDetailsUIHandler;
import org.fortiss.tooling.kernel.ui.internal.introspection.details.handler.PrototypeServiceIntrospectionDetailsUIHandler;
/**
* Registry class to provide the details GUI for a given {@link IIntrospectionItem}.
......
......@@ -15,7 +15,7 @@ $Id$
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.ui.internal.introspection.details.factories;
package org.fortiss.tooling.kernel.ui.internal.introspection.details.handler;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ScrolledComposite;
......
......@@ -15,7 +15,7 @@ $Id$
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.ui.internal.introspection.details.factories;
package org.fortiss.tooling.kernel.ui.internal.introspection.details.handler;
import org.conqat.ide.commons.ui.jface.TreeContentProviderBase;
import org.eclipse.jface.viewers.ColumnLabelProvider;
......@@ -67,9 +67,7 @@ public final class PrototypeServiceIntrospectionDetailsUIHandler extends Details
}
}, true);
Label lbl = new Label(filteredTree, SWT.NONE);
lbl.setText("Number of currently registered prototypes: " +
IPrototypeService.INSTANCE.getAllPrototypes().size());
createCounterLabel();
TreeViewer treeViewer = filteredTree.getViewer();
Tree tree = treeViewer.getTree();
......@@ -140,6 +138,14 @@ public final class PrototypeServiceIntrospectionDetailsUIHandler extends Details
return filteredTree;
}
/** Creates the label for counters of registered prototypes. */
private void createCounterLabel() {
Label lbl = new Label(filteredTree, SWT.NONE);
lbl.setText("Number of currently registered prototypes: " +
IPrototypeService.INSTANCE.getAllPrototypes().size() + " (" +
IPrototypeService.INSTANCE.getPrimaryPrototypes().size() + " primary prototypes)");
}
/** Find the prototype provider for the given prototype. */
private String findProtoypeProviderClassName(Prototype proto) {
for(IPrototypeProvider provider : IPrototypeService.INSTANCE.getPrototypeProviders()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment