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

Added EditPartFactoryService introspection with UI.

refs 2460
parent 2a2d1ee4
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,7 @@ import org.fortiss.tooling.kernel.introspection.KernelIntrospectionSystemService
import org.fortiss.tooling.kernel.service.base.EObjectAwareServiceBase;
import org.fortiss.tooling.kernel.ui.ToolingKernelUIActivator;
import org.fortiss.tooling.kernel.ui.extension.IEditPartFactory;
import org.fortiss.tooling.kernel.ui.internal.introspection.items.EditPartFactoryServiceIntrospectionDetailsItem;
import org.fortiss.tooling.kernel.ui.service.IEditPartFactoryService;
import org.fortiss.tooling.kernel.utils.LoggingUtils;
......@@ -134,7 +135,6 @@ public class EditPartFactoryService extends EObjectAwareServiceBase<IEditPartFac
/** {@inheritDoc} */
@Override
public IIntrospectionDetailsItem getDetailsItem() {
// TODO Auto-generated method stub
return null;
return new EditPartFactoryServiceIntrospectionDetailsItem(handlerMap);
}
}
......@@ -34,6 +34,7 @@ import org.fortiss.tooling.kernel.ui.internal.introspection.details.handler.Conn
import org.fortiss.tooling.kernel.ui.internal.introspection.details.handler.ConstraintCheckerServiceIntrospectionDetailsUIHandler;
import org.fortiss.tooling.kernel.ui.internal.introspection.details.handler.ContextMenuServiceIntrospectionDetailsUIHandler;
import org.fortiss.tooling.kernel.ui.internal.introspection.details.handler.EclipseResourceStorageProviderIntrospectionDetailsUIHandler;
import org.fortiss.tooling.kernel.ui.internal.introspection.details.handler.EditPartFactoryServiceIntrospectionDetailsUIHandler;
import org.fortiss.tooling.kernel.ui.internal.introspection.details.handler.ElementCompositorServiceIntrospectionDetailsUIHandler;
import org.fortiss.tooling.kernel.ui.internal.introspection.details.handler.LibraryServiceIntrospectionDetailsUIHandler;
import org.fortiss.tooling.kernel.ui.internal.introspection.details.handler.MigrationServiceIntrospectionDetailsUIHandler;
......@@ -41,6 +42,7 @@ import org.fortiss.tooling.kernel.ui.internal.introspection.details.handler.Pers
import org.fortiss.tooling.kernel.ui.internal.introspection.details.handler.PrototypeServiceIntrospectionDetailsUIHandler;
import org.fortiss.tooling.kernel.ui.internal.introspection.details.handler.TransformationServiceIntrospectionDetailsUIHandler;
import org.fortiss.tooling.kernel.ui.internal.introspection.items.ContextMenuServiceIntrospectionDetailsItem;
import org.fortiss.tooling.kernel.ui.internal.introspection.items.EditPartFactoryServiceIntrospectionDetailsItem;
/**
* Registry class to provide the details GUI for a given {@link IIntrospectionItem}.
......@@ -69,6 +71,8 @@ public final class KISSDetailsUIRegistry {
new ContextMenuServiceIntrospectionDetailsUIHandler());
registerHandler(EclipseResourceStorageProviderIntrospectionDetailsItem.class,
new EclipseResourceStorageProviderIntrospectionDetailsUIHandler());
registerHandler(EditPartFactoryServiceIntrospectionDetailsItem.class,
new EditPartFactoryServiceIntrospectionDetailsUIHandler());
registerHandler(ElementCompositorServiceIntrospectionDetailsItem.class,
new ElementCompositorServiceIntrospectionDetailsUIHandler());
registerHandler(LibraryServiceIntrospectionDetailsItem.class,
......
/*--------------------------------------------------------------------------+
$Id$
| |
| Copyright 2016 ForTISS GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.ui.internal.introspection.details.handler;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Tree;
import org.fortiss.tooling.kernel.introspection.items.EObjectAwareIntrospectionDetailsItemBase;
import org.fortiss.tooling.kernel.ui.internal.introspection.items.EditPartFactoryServiceIntrospectionDetailsItem;
/**
*
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating RED Hash:
*/
public class EditPartFactoryServiceIntrospectionDetailsUIHandler extends
EObjectAwareIntrospectionDetailsUIHandlerBase {
/** {@inheritDoc} */
@Override
public Control createComposite(ScrolledComposite parent) {
String heading = "Type to search registered editpart factories:";
String footer =
"Number of currently registered editpart factories: " +
getInputObject().countHandlers();
return createFilteredTreeInTabFolder(parent, heading, footer, "Registered Compositors");
}
/** {@inheritDoc} */
@Override
protected void createTreeColumns(Tree tree) {
createDefaultTreeColumns(tree, "Class / Factory", 250, "Factory Class", 400,
"EObject Class", 400);
}
/** {@inheritDoc} */
@Override
protected ITreeContentProvider createContentProvider() {
return new EObjectAwareTreeContentProviderBase() {
@Override
protected EObjectAwareIntrospectionDetailsItemBase<?> getInputObject() {
return EditPartFactoryServiceIntrospectionDetailsUIHandler.this.getInputObject();
}
};
}
/** {@inheritDoc} */
@Override
protected EditPartFactoryServiceIntrospectionDetailsItem getInputObject() {
return (EditPartFactoryServiceIntrospectionDetailsItem)dataItem;
}
}
/*--------------------------------------------------------------------------+
$Id$
| |
| Copyright 2016 ForTISS GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.ui.internal.introspection.items;
import java.util.List;
import java.util.Map;
import org.fortiss.tooling.kernel.introspection.IIntrospectionDetailsItem;
import org.fortiss.tooling.kernel.introspection.items.EObjectAwareIntrospectionDetailsItemBase;
import org.fortiss.tooling.kernel.ui.extension.IEditPartFactory;
import org.fortiss.tooling.kernel.ui.internal.EditPartFactoryService;
/**
* {@link IIntrospectionDetailsItem} for {@link EditPartFactoryService}.
*
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating RED Hash:
*/
public final class EditPartFactoryServiceIntrospectionDetailsItem extends
EObjectAwareIntrospectionDetailsItemBase<IEditPartFactory> {
/** Constructor. */
public EditPartFactoryServiceIntrospectionDetailsItem(
Map<Class<?>, List<IEditPartFactory>> handlerMap) {
super(handlerMap);
}
}
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