@Override public void setDocument(IDocument document) { setDocument(document, null, -1, -1); }
@Override public void setDocument(IDocument document, IAnnotationModel annotationModel) { setDocument(document, annotationModel, -1, -1); }
@Override public void setDocument(IDocument document) { setDocument(document, null, -1, -1); }
@Override public void setDocument(IDocument document, IAnnotationModel annotationModel, int modelRangeOffset, int modelRangeLength) { if (document != null) { configurePartitioning(document); } super.setDocument(document, annotationModel, modelRangeOffset, modelRangeLength); }
@Override public void setInput(Object input) { if (input instanceof IStreamContentAccessor) { fSourceViewer.setDocument(new Document(getString(input))); } else if (input instanceof ICompareInput) { fInput= (ICompareInput) input; ITypedElement left= fInput.getLeft(); fSourceViewer.setDocument(new Document(getString(left))); } }
public void setInput(Object input) { if (input instanceof IStreamContentAccessor) { fSourceViewer.setDocument(new Document(getString(input))); } else if (input instanceof ICompareInput) { fInput= (ICompareInput) input; ITypedElement left= fInput.getLeft(); fSourceViewer.setDocument(new Document(getString(left))); } }
@Override public void setInput(Object input) { if (input instanceof IStreamContentAccessor) { Document document= new Document(getString(input)); JavaCompareUtilities.setupDocument(document); fSourceViewer.setDocument(document); } fInput= input; }
@Override public void setInput(Object input) { if (input instanceof IStreamContentAccessor) { Document document= new Document(getString(input)); JavaCompareUtilities.setupPropertiesFileDocument(document); fSourceViewer.setDocument(document); } fInput= input; }
public void setInput(Object input) { if (input instanceof IStreamContentAccessor) { Document document= new Document(getString(input)); JavaCompareUtilities.setupPropertiesFileDocument(document); fSourceViewer.setDocument(document); } fInput= input; }
public void setInput(Object input) { if (input instanceof IStreamContentAccessor) { Document document= new Document(getString(input)); JavaCompareUtilities.setupDocument(document); fSourceViewer.setDocument(document); } fInput= input; }
@Override public void setInput(Object input) { if (input instanceof IStreamContentAccessor) { Document document= new Document(getString(input)); JavaCompareUtilities.setupDocument(document); fSourceViewer.setDocument(document); } fInput= input; }
@Override public void setInput(Object input) { if (input instanceof IStreamContentAccessor) { Document document= new Document(getString(input)); JavaCompareUtilities.setupPropertiesFileDocument(document); fSourceViewer.setDocument(document); } fInput= input; }
protected void setInput(String input) { IDocument document = createDocument(input); getSourceViewer().setDocument(document, createAnnotationModel()); }
@Override public void setInformation(String content) { if (content == null) { fViewer.setInput(null); return; } IDocument document = new Document(content); new AntDocumentSetupParticipant().setup(document); fViewer.setDocument(document); }
SourceViewer doCreateViewer(Composite parent, SourceViewerConfiguration viewerConfiguration) { SourceViewer viewer = null; String contentTypeID = ContentTypeIdForXML.ContentTypeID_XML; viewer = new StructuredTextViewer(parent, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL); ((StructuredTextViewer) viewer).getTextWidget().setFont(JFaceResources.getFont("org.eclipse.wst.sse.ui.textfont")); //$NON-NLS-1$ IStructuredModel scratchModel = StructuredModelManager.getModelManager().createUnManagedStructuredModelFor(contentTypeID); IDocument document = scratchModel.getStructuredDocument(); viewer.configure(viewerConfiguration); viewer.setDocument(document); return viewer; }
private void setSourceViewerContents(String contents) { if (contents != null) { final IJavaProject project= fProcessor.getDestinationType().getJavaProject(); final String[] lines= Strings.convertIntoLines(contents); if (lines.length > 0) { final int indent= Strings.computeIndentUnits(lines[lines.length - 1], project); contents= Strings.changeIndent(contents, indent, project, "", "\n"); //$NON-NLS-1$ //$NON-NLS-2$ } } final IDocument document= (contents == null) ? new Document() : new Document(contents); JavaPlugin.getDefault().getJavaTextTools().setupJavaDocumentPartitioner(document); fSourceViewer.setDocument(document); }
private void createSourceViewer(Composite c) { IPreferenceStore store= JavaPlugin.getDefault().getCombinedPreferenceStore(); fSourceViewer= new JavaSourceViewer(c, null, null, false, SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION, store); fSourceViewer.configure(new JavaSourceViewerConfiguration(getJavaTextTools().getColorManager(), store, null, null)); fSourceViewer.setEditable(false); fSourceViewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH)); fSourceViewer.getControl().setFont(JFaceResources.getFont(PreferenceConstants.EDITOR_TEXT_FONT)); Document document= new Document(); getJavaTextTools().setupJavaDocumentPartitioner(document); fSourceViewer.setDocument(document); }
private void createSourceViewer(Composite c) { IPreferenceStore store= JavaPlugin.getDefault().getCombinedPreferenceStore(); fSourceViewer= new JavaSourceViewer(c, null, null, false, SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION, store); fSourceViewer.configure(new JavaSourceViewerConfiguration(getJavaTextTools().getColorManager(), store, null, null)); fSourceViewer.setEditable(false); fSourceViewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH)); fSourceViewer.getControl().setFont(JFaceResources.getFont(PreferenceConstants.EDITOR_TEXT_FONT)); Document document= new Document(); getJavaTextTools().setupJavaDocumentPartitioner(document); fSourceViewer.setDocument(document); }
private void createSourceViewer(Composite c) { IPreferenceStore store= JavaPlugin.getDefault().getCombinedPreferenceStore(); fSourceViewer= new JavaSourceViewer(c, null, null, false, SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION, store); fSourceViewer.configure(new JavaSourceViewerConfiguration(getJavaTextTools().getColorManager(), store, null, null)); fSourceViewer.setEditable(false); fSourceViewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH)); fSourceViewer.getControl().setFont(JFaceResources.getFont(PreferenceConstants.EDITOR_TEXT_FONT)); Document document= new Document(); getJavaTextTools().setupJavaDocumentPartitioner(document); fSourceViewer.setDocument(document); }
private void setSourceViewerContents(String contents) { if (contents != null) { final IJavaProject project= getPullUpRefactoring().getPullUpProcessor().getDestinationType().getJavaProject(); final String[] lines= Strings.convertIntoLines(contents); if (lines.length > 0) { final int indent= Strings.computeIndentUnits(lines[lines.length - 1], project); contents= Strings.changeIndent(contents, indent, project, "", "\n"); //$NON-NLS-1$ //$NON-NLS-2$ } } final IDocument document= (contents == null) ? new Document() : new Document(contents); JavaPlugin.getDefault().getJavaTextTools().setupJavaDocumentPartitioner(document); fSourceViewer.setDocument(document); }