Package io.emmet

Examples of io.emmet.Emmet


  private String name = null;
  private ArrayList<AbstractMenuItem> items;
 
  public static Menu create() {
    // get all actions from Emmet core
    Emmet jse = Emmet.getSingleton();
    Object actions = jse.execJSFunction("require('actions').getMenu");
   
    return new Menu("Emmet", itemsFromJSArray((NativeArray) actions));
  }
View Full Code Here


  @Override
  public Object execute(ExecutionEvent event) throws ExecutionException {
    ActionRunner runner = ActionRunner.getSingleton();
    EclipseEmmetEditor editor = runner.getEditor();
    Emmet js = Emmet.getSingleton();
    String profileName = "eclipse";
   
    if (editor != null) {
      try {
        String abbr = editor.promptWrap("Enter abbreviation:");
       
        if (abbr != null && !abbr.equals("")) {
          // expand abbreviation with current profile
          return js.runAction(editor, "wrap_with_abbreviation",
              abbr, editor.getSyntax(), profileName);
        }
       
      } catch (Exception e) {
        e.printStackTrace();
View Full Code Here

  }
 
  public static boolean expand() {
    ActionRunner runner = ActionRunner.getSingleton();
    EclipseEmmetEditor editor = runner.getEditor();
    Emmet js = Emmet.getSingleton();
    String profileName = "eclipse";
   
    if (editor != null) {
      try {
        // force tab key handler installation
        TabKeyHandler.install(editor.getEditor());
       
        // expand abbreviation with current profile
        return js.runAction(editor, "expand_abbreviation", editor.getSyntax(), profileName);
      } catch (Exception e) {
        e.printStackTrace();
      }
     
    }
View Full Code Here

  }
 
  public static boolean expand() {
    ActionRunner runner = ActionRunner.getSingleton();
    EclipseEmmetEditor editor = runner.getEditor();
    Emmet js = Emmet.getSingleton();
//    String profileName = "eclipse";
   
    if (editor != null) {
      try {
        // force tab key handler installation
        TabKeyHandler.install(editor.getEditor());
       
        // expand abbreviation with current profile
        return js.runAction(editor, "expand_abbreviation", editor.getSyntax());
      } catch (Exception e) {
        e.printStackTrace();
      }
     
    }
View Full Code Here

TOP

Related Classes of io.emmet.Emmet

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.