Package org.epic.perleditor.editors

Examples of org.epic.perleditor.editors.PerlEditor$SmartLineStartAction


    public void linkActivated()
    {
        try
       
            PerlEditor editor = (PerlEditor) IDE.openEditor(
                activeWorkbenchPage(), getEditorInput().getFile(), true, true);
           
            IDocument doc = editor.getViewer().getDocument();
            IRegion line = doc.getLineInformation(lineNumber);
            editor.selectAndReveal(line.getOffset(), line.getLength());
        }
        catch (BadLocationException e)
        {
            PerlDebugPlugin.log(e);
        }
View Full Code Here


    //~ Methods

    protected void doRun()
    {
        PerlEditor editor = getEditor();
        IFileEditorInput editorInput = (IFileEditorInput) editor.getEditorInput();
        String filePath = editorInput.getFile().getLocation().makeAbsolute().toString();

        // Display directory dialog
        DirectoryDialog directoryDialog =
            new DirectoryDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
                SWT.SAVE);
        directoryDialog.setText("Select Output Directory");
        directoryDialog.setMessage("HTML Export...");

        directoryDialog.setFilterPath(lastSelectedDir);

        String outputDir = directoryDialog.open();
        if (outputDir == null) return;
       
        lastSelectedDir = outputDir;

        // Export options
        List cmdList = new ArrayList();

        cmdList.add("-html");
        cmdList.add("-opath");
        cmdList.add(outputDir);

        // Add additional options
        IPreferenceStore store = PerlEditorPlugin.getDefault().getPreferenceStore();
        StringTokenizer st =
            new StringTokenizer(store.getString(
                    SourceFormatterPreferences.HTML_EXPORT_OPTIONS));
        while (st.hasMoreTokens())
        {
            cmdList.add(st.nextToken());
        }

        // last thing has to be the input file name
        cmdList.add(filePath);

        try
        {
            SourceFormatter.format(
                editor.getViewer().getDocument().get(),
                cmdList,
                getLog());
        }
        catch (CoreException e)
        {
View Full Code Here

TOP

Related Classes of org.epic.perleditor.editors.PerlEditor$SmartLineStartAction

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.