Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.etrice.abstractexec.behavior/src')
-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
2 files changed, 0 insertions, 84 deletions
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