Package org.objectstyle.wolips.componenteditor.actions

Source Code of org.objectstyle.wolips.componenteditor.actions.CleanWOBuilderElementNamesAction

package org.objectstyle.wolips.componenteditor.actions;

import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.action.IAction;
import org.objectstyle.wolips.templateeditor.TemplateEditor;
import org.objectstyle.wolips.wodclipse.core.completion.WodParserCache;
import org.objectstyle.wolips.wodclipse.core.refactoring.CleanWOBuilderRefactoring;
import org.objectstyle.wolips.wodclipse.editor.WodEditor;

public class CleanWOBuilderElementNamesAction extends AbstractTemplateAction {
  @Override
  public void run(IAction action) {
    try {
      TemplateEditor templateEditor = getTemplateEditor();
      WodEditor wodEditor = getWodEditor();
      if (templateEditor != null && wodEditor != null) {
        WodParserCache cache = templateEditor.getSourceEditor().getParserCache();
        CleanWOBuilderRefactoring.run(cache, false, new NullProgressMonitor());
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }

}
TOP

Related Classes of org.objectstyle.wolips.componenteditor.actions.CleanWOBuilderElementNamesAction

TOP
Copyright © 2018 www.massapi.com. 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.