Package org.vimplugin

Examples of org.vimplugin.VimPlugin


      String last = contents.substring(offset + length);
      first = first + last;
      document.set(first);
      setDirty(true);
    } catch(Exception e) {
      VimPlugin plugin = VimPlugin.getDefault();
      logger.error(plugin.getMessage("document.remove.failed"), e);
    }
  }
View Full Code Here


  /**
   * @see AbstractPreferenceInitializer#initializeDefaultPreferences()
   */
  @Override
  public void initializeDefaultPreferences() {
    VimPlugin plugin = VimPlugin.getDefault();
    IPreferenceStore store = plugin.getPreferenceStore();
    store.setDefault(PreferenceConstants.P_PORT, 3219);
    store.setDefault(PreferenceConstants.P_EMBED,
        "true".equals(plugin.getProperty("gvim.embed.default")));
    store.setDefault(PreferenceConstants.P_TABBED, true);
    store.setDefault(PreferenceConstants.P_FOCUS_AUTO_CLICK, false);
    store.setDefault(PreferenceConstants.P_START_ECLIMD, true);
    store.setDefault(PreferenceConstants.P_GVIM,
        plugin.getProperty("gvim.default"));
  }
View Full Code Here

   * Initializes the preference store and sets a description for the dialog.
   */
  public VimPreferences() {
    super(FieldEditorPreferencePage.GRID);

    VimPlugin plugin = VimPlugin.getDefault();
    setPreferenceStore(plugin.getPreferenceStore());
    setDescription(plugin.getMessage("preferences.description"));
  }
View Full Code Here

   * Adds the fields.
   * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
   */
  @Override
  public void createFieldEditors() {
    VimPlugin plugin = VimPlugin.getDefault();
    if (!Os.isFamily(Os.FAMILY_MAC)){
      addField(new BooleanFieldEditor(
            PreferenceConstants.P_EMBED,
            plugin.getMessage("preference.embed"),
            getFieldEditorParent()));
    }
    addField(new BooleanFieldEditor(
          PreferenceConstants.P_TABBED,
          plugin.getMessage("preference.tabbed"),
          getFieldEditorParent()));
    addField(new BooleanFieldEditor(
          PreferenceConstants.P_START_ECLIMD,
          plugin.getMessage("preference.eclimd.start"),
          getFieldEditorParent()));
    addField(new BooleanFieldEditor(
          PreferenceConstants.P_FOCUS_AUTO_CLICK,
          plugin.getMessage("preference.focus.click"),
          getFieldEditorParent()));
    addField(new StringFieldEditor(
          PreferenceConstants.P_PORT,
          plugin.getMessage("preference.port"),
          getFieldEditorParent()));
    addField(new FileFieldEditor(
          PreferenceConstants.P_GVIM,
          plugin.getMessage("preference.gvim"),
          true,
          getFieldEditorParent()));
    addField(new StringFieldEditor(
          PreferenceConstants.P_OPTS,
          plugin.getMessage("preference.gvim.args"),
          getFieldEditorParent()));
  }
View Full Code Here

    // since that event, and not the "save" event, is the one we need, as a
    // workaround eclim includes an autocommand which sends an equivalent
    // keyCommand.
    if (event.equals("unmodified") ||
        (event.equals("keyCommand") && ve.getArgument(0).equals("\"unmodified\""))){
      VimPlugin plugin = VimPlugin.getDefault();
      VimConnection vc = ve.getConnection();
      VimServer server = vc != null ? plugin.getVimserver(vc.getVimID()) : null;
      if (server != null){
        for (VimEditor editor : server.getEditors()){
          if (editor != null && editor.getBufferID() == ve.getBufferID()){
            editor.setDirty(false);
          }
View Full Code Here

    // vim has a fileClosed event, but it is not implemented.
    if (event.equals("keyCommand") &&
        (argument = ve.getArgument(0)).startsWith("\"fileClosed ")){
      IPath filePath = new Path(argument.substring(12, argument.length() - 1));
      VimPlugin plugin = VimPlugin.getDefault();
      VimConnection vc = ve.getConnection();
      VimServer server = plugin.getVimserver(vc.getVimID());
      for (VimEditor editor : server.getEditors()){
        IPath location = editor.getSelectedFile().getRawLocation();
        if (filePath.equals(location)){
          editor.forceDispose();
        }
View Full Code Here

TOP

Related Classes of org.vimplugin.VimPlugin

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.