<commit_before>/**
 * 
 */
package de.uni_jena.iaa.linktype.atomic.editors.grapheditor.factories;

import de.uni_jena.iaa.linktype.atomic.editors.grapheditor.factories.SaltElementsFactory.ElementType;

import org.eclipse.gef.palette.CombinedTemplateCreationEntry;
import org.eclipse.gef.palette.ConnectionCreationToolEntry;
import org.eclipse.gef.palette.CreationToolEntry;
import org.eclipse.gef.palette.MarqueeToolEntry;
import org.eclipse.gef.palette.PaletteDrawer;
import org.eclipse.gef.palette.PaletteEntry;
import org.eclipse.gef.palette.PaletteRoot;
import org.eclipse.gef.palette.PaletteToolbar;
import org.eclipse.gef.palette.PanningSelectionToolEntry;
import org.eclipse.gef.palette.ToolEntry;
import org.eclipse.gef.tools.ConnectionCreationTool;

import de.uni_jena.iaa.linktype.atomic.editors.grapheditor.util.CreationAndDirectEditTool;

/**
 * @author <NAME>
 *
 */
public class GraphEditorPaletteFactory {

	public static PaletteRoot createPalette() {
		PaletteRoot palette = new PaletteRoot();
		palette.add(createToolsGroup(palette));
		palette.add(createNodesDrawer());
		palette.add(createEdgesDrawer());
		return palette;
	}

	private static PaletteEntry createEdgesDrawer() {
		PaletteDrawer edgesDrawer = new PaletteDrawer("Edges");
		edgesDrawer.add(createDominanceRelationTool());
		edgesDrawer.add(createSpanningRelationTool());
		return edgesDrawer;
	}

	private static PaletteEntry createSpanningRelationTool() {
		ConnectionCreationToolEntry entry = new ConnectionCreationToolEntry("Spanning relation", "Create a new spanning relation", new SaltElementsFactory(ElementType.SPANNING_RELATION), null, null);
		entry.setToolClass(ConnectionCreationTool.class);
		return entry;
	}

	private static PaletteEntry createDominanceRelationTool() {
		ConnectionCreationToolEntry entry = new ConnectionCreationToolEntry("Dominance relation", "Create a new dominance relation", new SaltElementsFactory(ElementType.DOMINANCE_RELATION), null, null);<commit_msg>Add pointing relations and order relations to palette<commit_after>/**
 * 
 */
package de.uni_jena.iaa.linktype.atomic.editors.grapheditor.factories;

import de.uni_jena.iaa.linktype.atomic.editors.grapheditor.factories.SaltElementsFactory.ElementType;

import org.eclipse.gef.palette.CombinedTemplateCreationEntry;
import org.eclipse.gef.palette.ConnectionCreationToolEntry;
import org.eclipse.gef.palette.CreationToolEntry;
import org.eclipse.gef.palette.MarqueeToolEntry;
import org.eclipse.gef.palette.PaletteDrawer;
import org.eclipse.gef.palette.PaletteEntry;
import org.eclipse.gef.palette.PaletteRoot;
import org.eclipse.gef.palette.PaletteToolbar;
import org.eclipse.gef.palette.PanningSelectionToolEntry;
import org.eclipse.gef.palette.ToolEntry;
import org.eclipse.gef.tools.ConnectionCreationTool;

import de.uni_jena.iaa.linktype.atomic.editors.grapheditor.util.CreationAndDirectEditTool;

/**
 * @author <NAME>
 *
 */
public class GraphEditorPaletteFactory {

	public static PaletteRoot createPalette() {
		PaletteRoot palette = new PaletteRoot();
		palette.add(createToolsGroup(palette));
		palette.add(createNodesDrawer());
		palette.add(createEdgesDrawer());
		return palette;
	}

	private static PaletteEntry createEdgesDrawer() {
		PaletteDrawer edgesDrawer = new PaletteDrawer("Edges");
		edgesDrawer.add(createDominanceRelationTool());
		edgesDrawer.add(createSpanningRelationTool());
		edgesDrawer.add(createPointingRelationTool());
		edgesDrawer.add(createOrderRelationTool());
		return edgesDrawer;
	}

	private static PaletteEntry createOrderRelationTool() {
		ConnectionCreationToolEntry entry = new ConnectionCreationToolEntry("Order relation", "Create a new order relation", new SaltElementsFactory(ElementType.ORDER_RELATION), null, null);
		entry.setToolClass(ConnectionCreationTool.class);
		return entry;
	}

	private static PaletteEntry createPointingRelationTool() {
		ConnectionCreationToolEntry entry = new ConnectionCreationToolEntry("Pointing relation", "Create a new pointing relation", new SaltElementsFactory(ElementType.POINTING_RELATION), null, null);
		entry.setToolClass(ConnectionCreationTool.class);
		return entry;
	}

	private static PaletteEntry createSpanningRelationTool() {
		ConnectionCreationToolEntry entry = new ConnectionCreationToolEntry("Spanning relation", "Create a new spanning relation", new SaltElementsFactory(ElementType.SPANNING_RELATION), null, null);
		entry.setToolClass(ConnectionCreationTool.class);
		return entry;
	}

	private static PaletteEntry createDominanceRelationTool() {
		ConnectionCreationToolEntry entry = new ConnectionCreationToolEntry("Dominance relation", "Create a new dominance relation", new SaltElementsFactory(ElementType.DOMINANCE_RELATION), null, null);
{'fraction_non_alphanumeric': 0.09566137566137566, 'fraction_numerical': 0.0, 'mean_word_length': 7.2334494773519165, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3879526', 'n_tokens_mistral': 1459, 'n_tokens_neox': 1401, 'n_words': 246}