Java 类org.eclipse.ui.internal.texteditor.TextEditorPlugin 实例源码

项目:bts    文件:E4TemplatePreferencePage.java   
@Override
protected IDialogSettings getDialogBoundsSettings() {
    String sectionName= getClass().getName() + "_dialogBounds"; //$NON-NLS-1$
    IDialogSettings settings= TextEditorPlugin.getDefault().getDialogSettings();
    IDialogSettings section= settings.getSection(sectionName);
    if (section == null)
        section= settings.addNewSection(sectionName);
    return section;
}
项目:bts    文件:E4TemplatePreferencePage.java   
private void openReadErrorDialog(IOException ex) {
    IStatus status= new Status(IStatus.ERROR, TextEditorPlugin.PLUGIN_ID, IStatus.OK, "Failed to read templates.", ex); //$NON-NLS-1$
    TextEditorPlugin.getDefault().getLog().log(status);
    String title= TemplatesMessages.TemplatePreferencePage_error_read_title;
    String message= TemplatesMessages.TemplatePreferencePage_error_read_message;
    MessageDialog.openError(getShell(), title, message);
}
项目:bts    文件:E4TemplatePreferencePage.java   
private void openWriteErrorDialog(IOException ex) {
    IStatus status= new Status(IStatus.ERROR, TextEditorPlugin.PLUGIN_ID, IStatus.OK, "Failed to write templates.", ex); //$NON-NLS-1$
    TextEditorPlugin.getDefault().getLog().log(status);
    String title= TemplatesMessages.TemplatePreferencePage_error_write_title;
    String message= TemplatesMessages.TemplatePreferencePage_error_write_message;
    MessageDialog.openError(getShell(), title, message);
}
项目:APICloud-Studio    文件:EclipseFindSettings.java   
/**
 * Returns the dialog settings object used to share state between several find/replace dialogs.
 * 
 * @return the dialog settings to be used
 */
private IDialogSettings getDialogSettings()
{
    IDialogSettings settings = TextEditorPlugin.getDefault().getDialogSettings();
    fDialogSettings = settings.getSection(FIND_REPLACE_DIALOG_CLASS_NAME);
    if (fDialogSettings == null)
        fDialogSettings = settings.addNewSection(FIND_REPLACE_DIALOG_CLASS_NAME);
    return fDialogSettings;
}
项目:eclipse-silverstripedt    文件:SilverStripeTemplatesPreferencePage.java   
private void openReadErrorDialog(IOException ex) {
    IStatus status= new Status(IStatus.ERROR, TextEditorPlugin.PLUGIN_ID, IStatus.OK, "Failed to read templates.", ex); //$NON-NLS-1$
    TextEditorPlugin.getDefault().getLog().log(status);
    String title="Reading Templates";
    String message="Failed to read templates. See the error log for details.";
    MessageDialog.openError(getShell(), title, message);
}
项目:eclipse-silverstripedt    文件:SilverStripeCATemplatesPreferencePage.java   
private void openReadErrorDialog(IOException ex) {
    IStatus status= new Status(IStatus.ERROR, TextEditorPlugin.PLUGIN_ID, IStatus.OK, "Failed to read templates.", ex); //$NON-NLS-1$
    TextEditorPlugin.getDefault().getLog().log(status);
    String title="Reading Templates";
    String message="Failed to read templates. See the error log for details.";
    MessageDialog.openError(getShell(), title, message);
}
项目:Pydev    文件:PySearchInOpenDocumentsAction.java   
@Override
public void run() {
    IDialogSettings settings = TextEditorPlugin.getDefault().getDialogSettings();
    IDialogSettings s = settings.getSection("org.eclipse.ui.texteditor.FindReplaceDialog");
    boolean caseSensitive = false;
    boolean wholeWord = false;
    boolean isRegEx = false;
    if (s != null) {
        caseSensitive = s.getBoolean("casesensitive"); //$NON-NLS-1$
        wholeWord = s.getBoolean("wholeword"); //$NON-NLS-1$
        isRegEx = s.getBoolean("isRegEx"); //$NON-NLS-1$
    }

    String searchText = "";
    if (parameters != null) {
        searchText = StringUtils.join(" ", parameters);
    }
    if (searchText.length() == 0) {
        PySelection ps = PySelectionFromEditor.createPySelectionFromEditor(edit);
        searchText = ps.getSelectedText();
    }
    IStatusLineManager statusLineManager = edit.getStatusLineManager();
    if (searchText.length() == 0) {
        InputDialog d = new InputDialog(EditorUtils.getShell(), "Text to search", "Enter text to search.", "",
                null);

        int retCode = d.open();
        if (retCode == InputDialog.OK) {
            searchText = d.getValue();
        }
    }

    if (searchText.length() >= 0) {
        if (wholeWord && !isRegEx && isWord(searchText)) {
            isRegEx = true;
            searchText = "\\b" + searchText + "\\b";
        }

        FindInOpenDocuments.findInOpenDocuments(searchText, caseSensitive, wholeWord, isRegEx, statusLineManager);
    }
}