Commit 74e32efd authored by Simon Barner's avatar Simon Barner
Browse files

GREEN

parent 5984cffb
IAllocationEditPartFactory.java 546b0c9d8f917d5feeb8bd92a547beb31474cb3e GREEN
IConstraintUI.java 755b0d8cb574ec682a1214320d5f89b9cce45346 GREEN
IContextMenuContributor.java 6c63f361004c33414428565c012b639076ded220 GREEN
......@@ -7,7 +6,7 @@ IEditPartFactory.java 1cbdb163615e68c280b6c275d05df82dea255527 GREEN
IModelEditor.java 44a6ca8f1ee97e170d277da1e726e4b342a27967 GREEN
IModelEditorBinding.java c7a814ea6d1428d9c9a4189098595d0addfe21ea GREEN
IModelElementHandler.java 706d9b96f8a516ef2d87071df25d0c4be1001424 GREEN
ITutorialStepUI.java 5d6f2e82c07f603e520571c3e270576321d44abd YELLOW
ITutorialStepUI.java 5d6f2e82c07f603e520571c3e270576321d44abd GREEN
ITutorialUIProvider.java db465be5b6783c2c3e389553a79d0dbdd5b5c83c GREEN
ITutorialUIWhitelistProvider.java e3ecbffaeeb5eab8509cf2381b52b22bf6c39648 GREEN
ModelEditorNotAvailableBinding.java c83a1533af1bdf27840272c5d6e8d7b456fdf52d GREEN
......@@ -3,10 +3,10 @@ AllocationEditPartFactoryService.java 8d176411639e01c15a65650747ec231ed7281777 G
ConstraintLabelDecorator.java 6dd2665a86800777cc7c17807fddb68dadf73df5 GREEN
ConstraintUIService.java dde08f7c2c19e948e397bb9cd3242d4735226ca2 GREEN
ContextMenuService.java f0168796a57fcebfb6124705c5a865516f0cb4c6 YELLOW
EditPartFactoryService.java a5b15d91675caf41fc7d4bc16092c9425326c539 YELLOW
EditPartFactoryService.java e3bc1a44761a2f444441233c61a67fdf0cc3f59d GREEN
MarkerService.java 04e3960acd4af5d1d41c2a4a2abd74a91441fe76 GREEN
ModelEditorBindingService.java 67cb577e2b89a9c0479698a3f45cef681885227e YELLOW
ModelElementHandlerService.java 6fa44187d4841b5b11b04de48dcf7b1bb20c7963 YELLOW
ModelElementHandlerService.java 6a15bf65b8bf7879293556125e3d2224e58e24f0 GREEN
NavigatorService.java 9a042a0ff9a21a45d98d14fe39b66e90ab974269 GREEN
ToolingKernelUIInternal.java aefc9a6a7ebcd6ff689558ffc4300992cca89ad6 GREEN
TutorialUIService.java 0f7124393b900ca8e1a87e7f985c0b440f2716fe RED
......@@ -16,6 +16,7 @@
package org.fortiss.tooling.kernel.ui.internal;
import static java.util.Collections.emptyList;
import static org.fortiss.tooling.kernel.utils.LoggingUtils.error;
import java.util.List;
......@@ -30,7 +31,6 @@ 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;
/**
* This class implements the {@link IEditPartFactoryService} interface.
......@@ -83,7 +83,7 @@ public class EditPartFactoryService extends EObjectAwareServiceBase<IEditPartFac
public EditPart createEditPart(EditPart context, Object modelElement) {
if(!(modelElement instanceof EObject)) {
LoggingUtils.error(ToolingKernelUIActivator.getDefault(),
error(ToolingKernelUIActivator.getDefault(),
EditPartFactoryService.class.getSimpleName() +
" may only be used for EObjects!");
return null;
......@@ -92,8 +92,8 @@ public class EditPartFactoryService extends EObjectAwareServiceBase<IEditPartFac
List<IEditPartFactory> factories = getRegisteredHandlers(clazz);
if(factories == null || factories.isEmpty()) {
LoggingUtils.error(ToolingKernelUIActivator.getDefault(),
"No editpart factory registered for " + clazz.getName());
error(ToolingKernelUIActivator.getDefault(), "No editpart factory registered for " +
clazz.getName());
return null;
}
......
......@@ -16,10 +16,11 @@
package org.fortiss.tooling.kernel.ui.internal;
import static java.util.Collections.emptyList;
import static org.conqat.lib.commons.string.StringUtils.wrapLongLines;
import static org.fortiss.tooling.kernel.utils.LoggingUtils.error;
import java.util.List;
import org.conqat.lib.commons.string.StringUtils;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.swt.graphics.Image;
import org.fortiss.tooling.kernel.ToolingKernelActivator;
......@@ -31,7 +32,6 @@ import org.fortiss.tooling.kernel.service.base.EObjectAwareServiceBase;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.internal.introspection.items.ModelElementHandlerServiceIntrospectionDetailsItem;
import org.fortiss.tooling.kernel.ui.service.IModelElementHandlerService;
import org.fortiss.tooling.kernel.utils.LoggingUtils;
/**
* This class implements the {@link IModelElementHandlerService} interface. It
......@@ -92,7 +92,7 @@ public class ModelElementHandlerService extends
Class<?> clazz = modelElement.getClass();
List<IModelElementHandler<EObject>> handlerList = getRegisteredHandlers(clazz);
if(handlerList == null || handlerList.isEmpty()) {
LoggingUtils.error(ToolingKernelActivator.getDefault(), "ERROR: " +
error(ToolingKernelActivator.getDefault(), "ERROR: " +
modelElement.getClass().getName() + " does not have a registered handler!");
return null;
}
......@@ -135,10 +135,7 @@ public class ModelElementHandlerService extends
@Override
public String getDescription(EObject modelElement) {
IModelElementHandler<EObject> handler = getModelElementHandler(modelElement);
if(handler != null) {
return handler.getDescription(modelElement);
}
return null;
return handler == null ? null : handler.getDescription(modelElement);
}
/** {@inheritDoc} */
......@@ -155,7 +152,7 @@ public class ModelElementHandlerService extends
if(handler == null) {
return "";
}
return StringUtils.wrapLongLines(
return wrapLongLines(
handler.getName(modelElement) + ": " + handler.getDescription(modelElement), 100);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment