--- /dev/null
+/*******************************************************************************\r
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
+ * in Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.diagram.symbolcontribution;\r
+\r
+import org.simantics.diagram.symbollibrary.ISymbolGroup;\r
+import org.simantics.diagram.symbollibrary.ISymbolItem;\r
+\r
+/**\r
+ * @author Tuukka Lehtonen\r
+ */\r
+public abstract class SymbolItem extends NamedObject implements ISymbolItem {\r
+\r
+ private final ISymbolGroup group;\r
+ private final String description;\r
+\r
+ public SymbolItem(Object identification, String name, ISymbolGroup group) {\r
+ this(identification, name, name, group);\r
+ }\r
+\r
+ public SymbolItem(Object identification, String name, String description, ISymbolGroup group) {\r
+ super(identification, name);\r
+ if (description == null)\r
+ throw new NullPointerException("null description");\r
+ if (group == null)\r
+ throw new NullPointerException("null group");\r
+ this.description = description;\r
+ this.group = group;\r
+ }\r
+\r
+ @Override\r
+ public String getDescription() {\r
+ return description;\r
+ }\r
+\r
+ @Override\r
+ public ISymbolGroup getGroup() {\r
+ return group;\r
+ }\r
+\r
+}
\ No newline at end of file