Skip to content
Snippets Groups Projects
Commit 2ea964ff authored by Vincent Aravantinos's avatar Vincent Aravantinos
Browse files

defined helper method

refs 2410
parent f8670410
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,7 @@ import org.fortiss.tooling.kernel.extension.data.ITopLevelElement;
import org.fortiss.tooling.kernel.model.IIdLabeled;
import org.fortiss.tooling.kernel.model.IIdLabeledReference;
import org.fortiss.tooling.kernel.model.ILibraryElementReference;
import org.fortiss.tooling.kernel.model.INamedCommentedElement;
import org.fortiss.tooling.kernel.model.INamedElement;
import org.fortiss.tooling.kernel.model.IProjectRootElement;
import org.fortiss.tooling.kernel.service.ICommandStackService;
......@@ -38,7 +39,7 @@ import org.fortiss.tooling.kernel.service.IPersistencyService;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: F04B1FC89158DE6DA3E8A4B915520FA7
* @ConQAT.Rating YELLOW Hash: 7C95224EE38B0DF2821F3387980946F5
*/
public final class KernelModelElementUtils {
......@@ -338,4 +339,18 @@ public final class KernelModelElementUtils {
public static void runAsCommand(EObject element, Runnable command) {
ICommandStackService.INSTANCE.runAsCommand(element, command);
}
/**
* @param t
* @param name
* @param comment
* @return <code>t</code> whose name and comment are set to <code>name</code> and
* <code>comment</code>
*/
public static <T extends INamedCommentedElement> T setNameComment(T t, String name,
String comment) {
t.setName(name);
t.setComment(comment);
return t;
}
}
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