Package org.eclipse.gef

Examples of org.eclipse.gef.EditDomain


        View view = (View) model;
        if (!(view instanceof Edge) && !view.isSetElement()) {
          return;
        }
      }
      EditDomain ed = editPart.getViewer().getEditDomain();
      if (!(ed instanceof DiagramEditDomain)) {
        return;
      }
      if (((DiagramEditDomain) ed).getEditorPart() instanceof OntoUML.diagram.part.OntoUMLDiagramEditor) {
        decoratorTarget.installDecorator(KEY, new StatusDecorator(
View Full Code Here


   * @param keyCode
   * @return the node or null
   */
  public Node getSpecialNode(KeyboardData keyCode) {
    Object name;
    EditDomain domain = _viewer.getEditDomain();
    Document document = null;
    if (domain instanceof DefaultEditDomain) {
      document = ((HTMLEditor) (((DefaultEditDomain) domain)
          .getEditorPart())).getDOMDocument();
    }
View Full Code Here

  abstract protected Tool createTool();

  public void run()
  {
    EditDomain editDomain = main.getEditDomain();
    if (editDomain != null)
    {
      editDomain.setActiveTool(tool);
    }
  }
View Full Code Here

   * Activate the default tool.
   */
  public void activateDefaultTool() {
    UIThreadRunnable.syncExec(new VoidResult() {
      public void run() {
        final EditDomain editDomain = getEditDomain();
        editDomain.setActiveTool(editDomain.getDefaultTool());
      }
    });
  }
View Full Code Here

  private SWTBotGefViewer activateTool(final Pattern labelMatcher, final int index) throws WidgetNotFoundException {
    final WidgetNotFoundException[] exception = new WidgetNotFoundException[1];
    UIThreadRunnable.syncExec(new VoidResult() {
      public void run() {
        final EditDomain editDomain = getEditDomain();
        final List<PaletteEntry> entries = new PaletteFinder(editDomain).findEntries(new ToolEntryLabelMatcher(labelMatcher));
        if (entries.size() > 0) {
          final PaletteEntry paletteEntry = entries.get(index);
          if (paletteEntry instanceof ToolEntry) {
            editDomain.getPaletteViewer().setActiveTool((ToolEntry) paletteEntry);
          } else {
            exception[0] = new WidgetNotFoundException(String.format("%s is not a tool entry, it's a %s", labelMatcher
                .toString(), paletteEntry.getClass().getName()));
          }
        } else {
View Full Code Here

TOP

Related Classes of org.eclipse.gef.EditDomain

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.