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

Added AllocationEditPartFactoryService introspection with UI.

refs 2460
parent 739c2b34
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.IAllocationEditPartFactory;
import org.fortiss.tooling.kernel.ui.internal.introspection.items.AllocationEditPartFactoryServiceIntrospectionDetailsItem;
import org.fortiss.tooling.kernel.ui.service.IAllocationEditPartFactoryService;
import org.fortiss.tooling.kernel.utils.LoggingUtils;
......@@ -135,7 +136,6 @@ public class AllocationEditPartFactoryService extends
/** {@inheritDoc} */
@Override
public IIntrospectionDetailsItem getDetailsItem() {
// TODO Auto-generated method stub
return null;
return new AllocationEditPartFactoryServiceIntrospectionDetailsItem(handlerMap);
}
}
......@@ -30,6 +30,7 @@ import org.fortiss.tooling.kernel.introspection.items.MigrationServiceIntrospect
import org.fortiss.tooling.kernel.introspection.items.PersistencyServiceIntrospectionDetailsItem;
import org.fortiss.tooling.kernel.introspection.items.PrototypeServiceIntrospectionDetailsItem;
import org.fortiss.tooling.kernel.introspection.items.TransformationServiceIntrospectionDetailsItem;
import org.fortiss.tooling.kernel.ui.internal.introspection.details.handler.AllocationEditPartFactoryServiceIntrospectionDetailsUIHandler;
import org.fortiss.tooling.kernel.ui.internal.introspection.details.handler.ConnectionCompositorServiceIntrospectionDetailsUIHandler;
import org.fortiss.tooling.kernel.ui.internal.introspection.details.handler.ConstraintCheckerServiceIntrospectionDetailsUIHandler;
import org.fortiss.tooling.kernel.ui.internal.introspection.details.handler.ContextMenuServiceIntrospectionDetailsUIHandler;
......@@ -41,6 +42,7 @@ import org.fortiss.tooling.kernel.ui.internal.introspection.details.handler.Migr
import org.fortiss.tooling.kernel.ui.internal.introspection.details.handler.PersistencyServiceIntrospectionDetailsUIHandler;
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.AllocationEditPartFactoryServiceIntrospectionDetailsItem;
import org.fortiss.tooling.kernel.ui.internal.introspection.items.ContextMenuServiceIntrospectionDetailsItem;
import org.fortiss.tooling.kernel.ui.internal.introspection.items.EditPartFactoryServiceIntrospectionDetailsItem;
......@@ -63,6 +65,8 @@ public final class KISSDetailsUIRegistry {
/** Constructor. */
public KISSDetailsUIRegistry() {
registerHandler(AllocationEditPartFactoryServiceIntrospectionDetailsItem.class,
new AllocationEditPartFactoryServiceIntrospectionDetailsUIHandler());
registerHandler(ConnectionCompositorServiceIntrospectionDetailsItem.class,
new ConnectionCompositorServiceIntrospectionDetailsUIHandler());
registerHandler(ConstraintCheckerServiceIntrospectionDetailsItem.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.AllocationEditPartFactoryService;
import org.fortiss.tooling.kernel.ui.internal.introspection.details.DetailsUIHandlerBase;
import org.fortiss.tooling.kernel.ui.internal.introspection.items.AllocationEditPartFactoryServiceIntrospectionDetailsItem;
/**
* {@link DetailsUIHandlerBase} for {@link AllocationEditPartFactoryService}.
*
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating RED Hash:
*/
public class AllocationEditPartFactoryServiceIntrospectionDetailsUIHandler extends
EObjectAwareIntrospectionDetailsUIHandlerBase {
/** {@inheritDoc} */
@Override
public Control createComposite(ScrolledComposite parent) {
String heading = "Type to search registered allocation editpart factories:";
String footer =
"Number of currently registered allocation editpart factories: " +
getInputObject().countHandlers();
return createFilteredTreeInTabFolder(parent, heading, footer, "Registered Factories");
}
/** {@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 AllocationEditPartFactoryServiceIntrospectionDetailsUIHandler.this
.getInputObject();
}
};
}
/** {@inheritDoc} */
@Override
protected AllocationEditPartFactoryServiceIntrospectionDetailsItem getInputObject() {
return (AllocationEditPartFactoryServiceIntrospectionDetailsItem)dataItem;
}
}
......@@ -22,9 +22,12 @@ 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.EditPartFactoryService;
import org.fortiss.tooling.kernel.ui.internal.introspection.details.DetailsUIHandlerBase;
import org.fortiss.tooling.kernel.ui.internal.introspection.items.EditPartFactoryServiceIntrospectionDetailsItem;
/**
* {@link DetailsUIHandlerBase} for {@link EditPartFactoryService}.
*
* @author hoelzl
* @author $Author$
......@@ -41,7 +44,7 @@ public class EditPartFactoryServiceIntrospectionDetailsUIHandler extends
String footer =
"Number of currently registered editpart factories: " +
getInputObject().countHandlers();
return createFilteredTreeInTabFolder(parent, heading, footer, "Registered Compositors");
return createFilteredTreeInTabFolder(parent, heading, footer, "Registered Factories");
}
/** {@inheritDoc} */
......
/*--------------------------------------------------------------------------+
$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.IAllocationEditPartFactory;
import org.fortiss.tooling.kernel.ui.internal.AllocationEditPartFactoryService;
/**
* {@link IIntrospectionDetailsItem} for {@link AllocationEditPartFactoryService}.
*
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating RED Hash:
*/
public final class AllocationEditPartFactoryServiceIntrospectionDetailsItem extends
EObjectAwareIntrospectionDetailsItemBase<IAllocationEditPartFactory> {
/** Constructor. */
public AllocationEditPartFactoryServiceIntrospectionDetailsItem(
Map<Class<?>, List<IAllocationEditPartFactory>> 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