Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2012-07-02 12:19:48 -0400
committerHenrik Rentz-Reichert2012-07-02 12:19:48 -0400
commit7100e6f9c560f7e82d491d1f52b2e8866ff64ce8 (patch)
tree7ddaaf814e77a7415ff52ee544ae604bb736c9a7
parent618ecb25c890e060d3f395de8b02eb7e5b1f58d1 (diff)
downloadorg.eclipse.etrice-7100e6f9c560f7e82d491d1f52b2e8866ff64ce8.tar.gz
org.eclipse.etrice-7100e6f9c560f7e82d491d1f52b2e8866ff64ce8.tar.xz
org.eclipse.etrice-7100e6f9c560f7e82d491d1f52b2e8866ff64ce8.zip
[abstractexec.behavior] removed demo stuff
-rw-r--r--plugins/org.eclipse.etrice.abstractexec.behavior/plugin.xml12
-rw-r--r--plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/DemoQuickfix.java40
-rw-r--r--plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/DemoValidator.java44
3 files changed, 0 insertions, 96 deletions
diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/plugin.xml b/plugins/org.eclipse.etrice.abstractexec.behavior/plugin.xml
index ecdee00b0..d5e518210 100644
--- a/plugins/org.eclipse.etrice.abstractexec.behavior/plugin.xml
+++ b/plugins/org.eclipse.etrice.abstractexec.behavior/plugin.xml
@@ -4,11 +4,6 @@
<extension
point="org.eclipse.etrice.core.room.validation">
<validator
- class="org.eclipse.etrice.abstractexec.behavior.DemoValidator"
- classToCheck="org.eclipse.etrice.core.room.ActorClass"
- mode="FAST">
- </validator>
- <validator
class="org.eclipse.etrice.abstractexec.behavior.AbstractExecutionValidator"
classToCheck="org.eclipse.etrice.core.room.ActorClass"
mode="FAST">
@@ -19,12 +14,5 @@
mode="FAST">
</validator>
</extension>
- <extension
- point="org.eclipse.etrice.core.room.ui.quickfix">
- <quickfixProvider
- class="org.eclipse.etrice.abstractexec.behavior.DemoQuickfix"
- code="demo_issue">
- </quickfixProvider>
- </extension>
</plugin>
diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/DemoQuickfix.java b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/DemoQuickfix.java
deleted file mode 100644
index 900343e68..000000000
--- a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/DemoQuickfix.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
- * 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:
- * Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.abstractexec.behavior;
-
-import org.eclipse.etrice.core.ui.quickfix.IRoomQuickfixProvider;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.xtext.ui.editor.model.IXtextDocument;
-import org.eclipse.xtext.ui.editor.model.edit.IModification;
-import org.eclipse.xtext.ui.editor.model.edit.IModificationContext;
-import org.eclipse.xtext.ui.editor.quickfix.IssueResolutionAcceptor;
-import org.eclipse.xtext.validation.Issue;
-
-public class DemoQuickfix implements IRoomQuickfixProvider {
-
- public DemoQuickfix() {
- }
-
- @Override
- public void getResolution(final Issue issue, IssueResolutionAcceptor acceptor) {
- // 3rd arg is image, check ImageHelper how this could work
- acceptor.accept(issue, issue.getData()[0]+"_ac", "change actor class name to "+issue.getData()[0]+"_ac", null, new IModification() {
- public void apply(IModificationContext context) throws BadLocationException {
- IXtextDocument xtextDocument = context.getXtextDocument();
-// String firstLetter = xtextDocument.get(issue.getOffset(), 1);
- xtextDocument.replace(issue.getOffset()+issue.getData()[0].length(), 0, "_ac");
- }
- });
- }
-
-}
diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/DemoValidator.java b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/DemoValidator.java
deleted file mode 100644
index ade8ace17..000000000
--- a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/DemoValidator.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
- * 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:
- * Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.abstractexec.behavior;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.etrice.core.room.ActorClass;
-import org.eclipse.etrice.core.room.RoomPackage;
-import org.eclipse.etrice.core.validation.IRoomValidator;
-import org.eclipse.xtext.validation.ValidationMessageAcceptor;
-
-/**
- * @author Henrik Rentz-Reichert
- *
- */
-public class DemoValidator implements IRoomValidator {
-
- public static final String DEMO_ISSUE_CODE = "demo_issue";
-
- // HOWTO: if validator is running in check mode NORMAL there are issues with marker updates
- // the marker appears grayed and quick fixes aren't available
-
- @Override
- public void validate(EObject object,
- ValidationMessageAcceptor messageAcceptor) {
-
- if (!(object instanceof ActorClass))
- return;
-
- ActorClass ac = (ActorClass) object;
- if (!ac.getName().endsWith("_ac"))
- messageAcceptor.acceptWarning("ActorClass name must end with _ac", ac, RoomPackage.Literals.ROOM_CLASS__NAME, -1, DEMO_ISSUE_CODE, ac.getName());
- }
-
-}

Back to the top