Package org.jitterbit.application.ui.text.editor

Examples of org.jitterbit.application.ui.text.editor.ChunkedTextFileEditor


                openFile(file);
            }
        }

        private void openFile(File file) {
            ChunkedTextFileEditor editor = findOpenEditor(file);
            if (editor != null) {
                editor.refresh();
            } else {
                fileMonitor.fileOpened(file);
                editor = createEditor(file);
            }
            getWindow().getEditorService().openEditor(editor);
View Full Code Here


            return null;
        }

        private ChunkedTextFileEditor createEditor(File file) {
            String title = LogFileUtils.getDisplayName(file);
            ChunkedTextFileEditor editor = TextEditorFactory.openFileInChunks(title, file, "UTF-8", FILE_CHUNK_SIZE);
            if (repository.isSystemOut(file)) {
                editor.decorateText(TextStyles.SystemOutText.asTextDecorator());
            } else if (repository.isSystemErr(file)) {
                editor.decorateText(TextStyles.SystemErrText.asTextDecorator());
            } else {
                editor.decorateText(TextStyles.DefaultMonoSpaced.asTextDecorator());
            }
            EditorCategory category = new EditorCategory("Client Log Files", PackageResources.View.ICON);
            editor.setCategory(category);
            editor.setSuggestedTargetNameForCopy(file.getName());
            editor.setMementoPath(new String[] { "Application", "LogFile" });
            return editor;
        }
View Full Code Here

TOP

Related Classes of org.jitterbit.application.ui.text.editor.ChunkedTextFileEditor

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.