issue_id
int64 2.04k
425k
| title
stringlengths 9
251
| body
stringlengths 4
32.8k
⌀ | status
stringclasses 6
values | after_fix_sha
stringlengths 7
7
| project_name
stringclasses 6
values | repo_url
stringclasses 6
values | repo_name
stringclasses 6
values | language
stringclasses 1
value | issue_url
null | before_fix_sha
null | pull_url
null | commit_datetime
timestamp[us, tz=UTC] | report_datetime
timestamp[us, tz=UTC] | updated_file
stringlengths 23
187
| chunk_content
stringlengths 1
22k
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
13,744 |
Bug 13744 jar export wizard: wrong path to resource folders
|
Ther jar export wizard creates since last integration build 20020412 a wrong path to the resource path of eg. images. The wizard adds a "src/" below the image or resource path. I have my sources in "src/" and the binaries in "bin/".
|
resolved fixed
|
a30f3ea
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-16T13:10:55Z | 2002-04-13T17:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
|
} finally {
try {
if (fJarWriter != null)
fJarWriter.close();
} catch (IOException ex) {
String message= JarPackagerMessages.getFormattedString("JarFileExportOperation.unableToCloseJarFile", ex.getLocalizedMessage());
addError(message, ex);
throw new InvocationTargetException(ex, message);
}
progressMonitor.done();
}
}
protected boolean preconditionsOK() {
if (!fJarPackage.areClassFilesExported() && !fJarPackage.areJavaFilesExported()) {
addError(JarPackagerMessages.getString("JarFileExportOperation.noExportTypeChosen"), null);
return false;
}
if (fJarPackage.getElements() == null || fJarPackage.getElements().length == 0) {
addError(JarPackagerMessages.getString("JarFileExportOperation.noResourcesSelected"), null);
return false;
}
if (fJarPackage.getJarLocation() == null) {
addError(JarPackagerMessages.getString("JarFileExportOperation.invalidJarLocation"), null);
return false;
}
if (!fJarPackage.isManifestAccessible()) {
addError(JarPackagerMessages.getString("JarFileExportOperation.manifestDoesNotExist"), null);
return false;
}
|
13,744 |
Bug 13744 jar export wizard: wrong path to resource folders
|
Ther jar export wizard creates since last integration build 20020412 a wrong path to the resource path of eg. images. The wizard adds a "src/" below the image or resource path. I have my sources in "src/" and the binaries in "bin/".
|
resolved fixed
|
a30f3ea
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-16T13:10:55Z | 2002-04-13T17:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
|
if (!fJarPackage.isMainClassValid(new BusyIndicatorRunnableContext())) {
addError(JarPackagerMessages.getString("JarFileExportOperation.invalidMainClass"), null);
return false;
}
IFile[] unsavedFiles= getUnsavedFiles();
if (unsavedFiles.length > 0)
return saveModifiedResourcesIfUserConfirms(unsavedFiles);
return true;
}
/**
* Returns the files which are not saved and which are
* part of the files being exported.
*
* @return an array of unsaved files
*/
private IFile[] getUnsavedFiles() {
IEditorPart[] dirtyEditors= JavaPlugin.getDirtyEditors();
Set unsavedFiles= new HashSet(dirtyEditors.length);
if (dirtyEditors.length > 0) {
List selection= JarPackagerUtil.asResources(fJarPackage.getElements());
for (int i= 0; i < dirtyEditors.length; i++) {
if (dirtyEditors[i].getEditorInput() instanceof IFileEditorInput) {
IFile dirtyFile= ((IFileEditorInput)dirtyEditors[i].getEditorInput()).getFile();
if (selection.contains(dirtyFile)) {
unsavedFiles.add(dirtyFile);
}
}
}
}
|
13,744 |
Bug 13744 jar export wizard: wrong path to resource folders
|
Ther jar export wizard creates since last integration build 20020412 a wrong path to the resource path of eg. images. The wizard adds a "src/" below the image or resource path. I have my sources in "src/" and the binaries in "bin/".
|
resolved fixed
|
a30f3ea
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-16T13:10:55Z | 2002-04-13T17:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
|
return (IFile[])unsavedFiles.toArray(new IFile[unsavedFiles.size()]);
}
/**
* Asks the user to confirm to save the modified resources.
*
* @return true if user pressed OK.
*/
private boolean confirmSaveModifiedResources(IFile[] dirtyFiles) {
if (dirtyFiles == null || dirtyFiles.length == 0)
return true;
Display display= fParentShell.getDisplay();
if (display == null || display.isDisposed())
return false;
final ConfirmSaveModifiedResourcesDialog dlg= new ConfirmSaveModifiedResourcesDialog(fParentShell, dirtyFiles);
final int[] intResult= new int[1];
Runnable runnable= new Runnable() {
public void run() {
intResult[0]= dlg.open();
}
};
display.syncExec(runnable);
return intResult[0] == IDialogConstants.OK_ID;
}
/**
* Asks to confirm to save the modified resources
* and save them if OK is pressed.
*
* @return true if user pressed OK and save was successful.
|
13,744 |
Bug 13744 jar export wizard: wrong path to resource folders
|
Ther jar export wizard creates since last integration build 20020412 a wrong path to the resource path of eg. images. The wizard adds a "src/" below the image or resource path. I have my sources in "src/" and the binaries in "bin/".
|
resolved fixed
|
a30f3ea
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-16T13:10:55Z | 2002-04-13T17:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
|
*/
private boolean saveModifiedResourcesIfUserConfirms(IFile[] dirtyFiles) {
if (confirmSaveModifiedResources(dirtyFiles))
return saveModifiedResources(dirtyFiles);
for (int i= 0; i < dirtyFiles.length; i++)
addError(JarPackagerMessages.getFormattedString("JarFileExportOperation.fileUnsaved", dirtyFiles[i].getFullPath()), null);
return false;
}
/**
* Save all of the editors in the workbench.
*
* @return true if successful.
*/
private boolean saveModifiedResources(final IFile[] dirtyFiles) {
Display display= fParentShell.getDisplay();
if (display == null || display.isDisposed())
return false;
final boolean[] retVal= new boolean[1];
Runnable runnable= new Runnable() {
public void run() {
IWorkspace workspace= ResourcesPlugin.getWorkspace();
IWorkspaceDescription description= workspace.getDescription();
boolean autoBuild= description.isAutoBuilding();
description.setAutoBuilding(false);
try {
workspace.setDescription(description);
|
13,744 |
Bug 13744 jar export wizard: wrong path to resource folders
|
Ther jar export wizard creates since last integration build 20020412 a wrong path to the resource path of eg. images. The wizard adds a "src/" below the image or resource path. I have my sources in "src/" and the binaries in "bin/".
|
resolved fixed
|
a30f3ea
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-16T13:10:55Z | 2002-04-13T17:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
|
try {
new ProgressMonitorDialog(fParentShell).run(false, false, createSaveModifiedResourcesRunnable(dirtyFiles));
retVal[0]= true;
} finally {
description.setAutoBuilding(autoBuild);
workspace.setDescription(description);
}
} catch (InvocationTargetException ex) {
addError(JarPackagerMessages.getString("JarFileExportOperation.errorSavingModifiedResources"), ex);
JavaPlugin.log(ex);
retVal[0]= false;
} catch (InterruptedException ex) {
Assert.isTrue(false);
retVal[0]= false;
} catch (CoreException ex) {
addError(JarPackagerMessages.getString("JarFileExportOperation.errorSavingModifiedResources"), ex);
JavaPlugin.log(ex);
retVal[0]= false;
}
}
};
display.syncExec(runnable);
return retVal[0];
}
private IRunnableWithProgress createSaveModifiedResourcesRunnable(final IFile[] dirtyFiles) {
return new IRunnableWithProgress() {
public void run(final IProgressMonitor pm) {
IEditorPart[] editorsToSave= JavaPlugin.getDirtyEditors();
pm.beginTask(JarPackagerMessages.getString("JarFileExportOperation.savingModifiedResources"), editorsToSave.length);
|
13,744 |
Bug 13744 jar export wizard: wrong path to resource folders
|
Ther jar export wizard creates since last integration build 20020412 a wrong path to the resource path of eg. images. The wizard adds a "src/" below the image or resource path. I have my sources in "src/" and the binaries in "bin/".
|
resolved fixed
|
a30f3ea
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-16T13:10:55Z | 2002-04-13T17:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
|
try {
List dirtyFilesList= Arrays.asList(dirtyFiles);
for (int i= 0; i < editorsToSave.length; i++) {
if (editorsToSave[i].getEditorInput() instanceof IFileEditorInput) {
IFile dirtyFile= ((IFileEditorInput)editorsToSave[i].getEditorInput()).getFile();
if (dirtyFilesList.contains((dirtyFile)))
editorsToSave[i].doSave(new SubProgressMonitor(pm, 1));
}
pm.worked(1);
}
} finally {
pm.done();
}
}
};
}
protected void saveFiles() {
if (fJarPackage.isManifestGenerated() && fJarPackage.isManifestSaved()) {
try {
saveManifest();
} catch (CoreException ex) {
addError(JarPackagerMessages.getString("JarFileExportOperation.errorSavingManifest"), ex);
} catch (IOException ex) {
addError(JarPackagerMessages.getString("JarFileExportOperation.errorSavingManifest"), ex);
}
}
if (fJarPackage.isDescriptionSaved()) {
|
13,744 |
Bug 13744 jar export wizard: wrong path to resource folders
|
Ther jar export wizard creates since last integration build 20020412 a wrong path to the resource path of eg. images. The wizard adds a "src/" below the image or resource path. I have my sources in "src/" and the binaries in "bin/".
|
resolved fixed
|
a30f3ea
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-16T13:10:55Z | 2002-04-13T17:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
|
try {
saveDescription();
} catch (CoreException ex) {
addError(JarPackagerMessages.getString("JarFileExportOperation.errorSavingDescription"), ex);
} catch (IOException ex) {
addError(JarPackagerMessages.getString("JarFileExportOperation.errorSavingDescription"), ex);
}
}
}
protected void saveDescription() throws CoreException, IOException {
if (fJarPackage.isManifestReused())
fJarPackage.setGenerateManifest(false);
ByteArrayOutputStream objectStreamOutput= new ByteArrayOutputStream();
IJarDescriptionWriter writer= fJarPackage.createJarDescriptionWriter(objectStreamOutput);
ByteArrayInputStream fileInput= null;
try {
writer.write(fJarPackage);
fileInput= new ByteArrayInputStream(objectStreamOutput.toByteArray());
IFile descriptionFile= fJarPackage.getDescriptionFile();
if (descriptionFile.isAccessible() && (fJarPackage.allowOverwrite() || JarPackagerUtil.askForOverwritePermission(fParentShell, descriptionFile.getFullPath().toString())))
descriptionFile.setContents(fileInput, true, true, null);
else {
descriptionFile.create(fileInput, true, null);
}
} finally {
if (fileInput != null)
fileInput.close();
if (writer != null)
writer.close();
|
13,744 |
Bug 13744 jar export wizard: wrong path to resource folders
|
Ther jar export wizard creates since last integration build 20020412 a wrong path to the resource path of eg. images. The wizard adds a "src/" below the image or resource path. I have my sources in "src/" and the binaries in "bin/".
|
resolved fixed
|
a30f3ea
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-16T13:10:55Z | 2002-04-13T17:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
|
}
}
protected void saveManifest() throws CoreException, IOException {
ByteArrayOutputStream manifestOutput= new ByteArrayOutputStream();
ByteArrayInputStream fileInput= null;
try {
Manifest manifest= fJarPackage.getManifestProvider().create(fJarPackage);
manifest.write(manifestOutput);
fileInput= new ByteArrayInputStream(manifestOutput.toByteArray());
IFile manifestFile= fJarPackage.getManifestFile();
if (manifestFile.isAccessible() && (fJarPackage.allowOverwrite() || JarPackagerUtil.askForOverwritePermission(fParentShell, manifestFile.getFullPath().toString())))
manifestFile.setContents(fileInput, true, true, null);
else {
manifestFile.create(fileInput, true, null);
}
} finally {
if (manifestOutput != null)
manifestOutput.close();
if (fileInput != null)
fileInput.close();
}
}
private boolean isAutoBuilding() {
return ResourcesPlugin.getWorkspace().getDescription().isAutoBuilding();
}
private boolean isCompilerGeneratingSourceFileAttribute() {
Object value= JavaCore.getOptions().get(COMPILER_SOURCE_FILE_ATTR);
if (value instanceof String)
return "generate".equalsIgnoreCase((String)value);
|
13,744 |
Bug 13744 jar export wizard: wrong path to resource folders
|
Ther jar export wizard creates since last integration build 20020412 a wrong path to the resource path of eg. images. The wizard adds a "src/" below the image or resource path. I have my sources in "src/" and the binaries in "bin/".
|
resolved fixed
|
a30f3ea
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-16T13:10:55Z | 2002-04-13T17:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
|
else
return true;
}
private void buildProjects(IProgressMonitor progressMonitor) {
Set builtProjects= new HashSet(10);
Object[] elements= fJarPackage.getElements();
for (int i= 0; i < elements.length; i++) {
IProject project= null;
Object element= elements[i];
if (element instanceof IResource)
project= ((IResource)element).getProject();
else if (element instanceof IJavaElement)
project= ((IJavaElement)element).getJavaProject().getProject();
if (project != null && !builtProjects.contains(project)) {
try {
project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, progressMonitor);
} catch (CoreException ex) {
String message= JarPackagerMessages.getFormattedString("JarFileExportOperation.errorDuringProjectBuild", project.getFullPath());
addError(message, ex);
} finally {
builtProjects.add(project);
}
}
}
}
/**
* Tells whether the given resource (or its children) have compile errors.
* The method acts on the current build state and does not recompile.
*
|
13,744 |
Bug 13744 jar export wizard: wrong path to resource folders
|
Ther jar export wizard creates since last integration build 20020412 a wrong path to the resource path of eg. images. The wizard adds a "src/" below the image or resource path. I have my sources in "src/" and the binaries in "bin/".
|
resolved fixed
|
a30f3ea
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-16T13:10:55Z | 2002-04-13T17:46:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
|
* @param resource the resource to check for errors
* @return <code>true</code> if the resource (and its children) are error free
* @throws import org.eclipse.core.runtime.CoreException if there's a marker problem
*/
private boolean hasCompileErrors(IResource resource) throws CoreException {
IMarker[] problemMarkers= resource.findMarkers(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_INFINITE);
for (int i= 0; i < problemMarkers.length; i++) {
if (problemMarkers[i].getAttribute(IMarker.SEVERITY, -1) == IMarker.SEVERITY_ERROR)
return true;
}
return false;
}
/**
* Tells whether the given resource (or its children) have compile errors.
* The method acts on the current build state and does not recompile.
*
* @param resource the resource to check for errors
* @return <code>true</code> if the resource (and its children) are error free
* @throws import org.eclipse.core.runtime.CoreException if there's a marker problem
*/
private boolean hasCompileWarnings(IResource resource) throws CoreException {
IMarker[] problemMarkers= resource.findMarkers(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_INFINITE);
for (int i= 0; i < problemMarkers.length; i++) {
if (problemMarkers[i].getAttribute(IMarker.SEVERITY, -1) == IMarker.SEVERITY_WARNING)
return true;
}
return false;
}
}
|
13,877 |
Bug 13877 NLS tool - values are not displayed correctly
|
On the first page, the values ".", "...", "\n" are displayed as "", "", " ". At least the case of "." seems to happen for windows as well. I think "\n" should be displayed in the escaped notation again, as "\n".
|
resolved fixed
|
5cfdae2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-16T14:15:43Z | 2002-04-16T12:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemTableViewer.java
|
package org.eclipse.jdt.internal.ui.viewsupport;
import java.util.Set;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Item;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.TableViewer;
/**
* Extends a TableViewer to allow more performance when showing error ticks.
* A <code>ProblemItemMapper</code> is contained that maps all items in
* the tree to underlying resource
*/
public class ProblemTableViewer extends TableViewer implements IProblemChangedListener {
private ProblemItemMapper fProblemItemMapper;
/**
* Constructor for ProblemTableViewer.
* @param parent
|
13,877 |
Bug 13877 NLS tool - values are not displayed correctly
|
On the first page, the values ".", "...", "\n" are displayed as "", "", " ". At least the case of "." seems to happen for windows as well. I think "\n" should be displayed in the escaped notation again, as "\n".
|
resolved fixed
|
5cfdae2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-16T14:15:43Z | 2002-04-16T12:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemTableViewer.java
|
*/
public ProblemTableViewer(Composite parent) {
super(parent);
initMapper();
}
/**
* Constructor for ProblemTableViewer.
* @param parent
* @param style
*/
public ProblemTableViewer(Composite parent, int style) {
super(parent, style);
initMapper();
}
/**
* Constructor for ProblemTableViewer.
* @param table
*/
public ProblemTableViewer(Table table) {
super(table);
initMapper();
}
private void initMapper() {
fProblemItemMapper= new ProblemItemMapper();
}
/*
* @see IProblemChangedListener#problemsChanged
*/
public void problemsChanged(final Set changed) {
|
13,877 |
Bug 13877 NLS tool - values are not displayed correctly
|
On the first page, the values ".", "...", "\n" are displayed as "", "", " ". At least the case of "." seems to happen for windows as well. I think "\n" should be displayed in the escaped notation again, as "\n".
|
resolved fixed
|
5cfdae2
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-16T14:15:43Z | 2002-04-16T12:26:40Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/ProblemTableViewer.java
|
Control control= getControl();
if (control != null && !control.isDisposed()) {
control.getDisplay().asyncExec(new Runnable() {
public void run() {
fProblemItemMapper.problemsChanged(changed, (ILabelProvider)getLabelProvider());
}
});
}
}
/*
* @see StructuredViewer#mapElement(Object, Widget)
*/
protected void mapElement(Object element, Widget item) {
super.mapElement(element, item);
if (item instanceof Item) {
fProblemItemMapper.addToMap(element, (Item) item);
}
}
/*
* @see StructuredViewer#unmapElement(Object, Widget)
*/
protected void unmapElement(Object element, Widget item) {
if (item instanceof Item) {
fProblemItemMapper.removeFromMap(element, (Item) item);
}
super.unmapElement(element, item);
}
}
|
13,907 |
Bug 13907 Scanner does not report whitespace tokens at end of input
|
The Scanner does not report the whitespace at the end of its input. The whitespace is added to the EOF token. If I explicitely ask for whitespace this behavior seems to be wrong (comments are reported correctly). Run the following testcase: import org.eclipse.jdt.core.compiler.InvalidInputException; import org.eclipse.jdt.internal.compiler.parser.Scanner; import org.eclipse.jdt.core.compiler.ITerminalSymbols; public class ScannerTest { public static void main(String[] args) { String input= "package com.ibm.itp.compare.ui; //foo \r\n"; int l= input.length(); Scanner scanner= new Scanner(true, true); // returns comments & whitespace char[] chars= new char[l]; input.getChars(0, l, chars, 0); scanner.setSource(chars); try { for (;;) { int t= 0; switch (t= scanner.getNextToken()) { case ITerminalSymbols.TokenNameEOF: System.out.println("EOF"); return; case ITerminalSymbols.TokenNameWHITESPACE: System.out.println("WS"); break; case ITerminalSymbols.TokenNameCOMMENT_LINE: System.out.println("COMMENT"); break; case ITerminalSymbols.TokenNameSEMICOLON: System.out.println("SEMICOLON"); break; default: System.out.println("Token: " + t); break; } } } catch (InvalidInputException ex) { } } }
|
verified fixed
|
606480f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T09:01:56Z | 2002-04-16T15:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaTokenComparator.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.compare;
import org.eclipse.jface.util.Assert;
import org.eclipse.jdt.core.compiler.InvalidInputException;
import org.eclipse.jdt.internal.compiler.parser.Scanner;
import org.eclipse.jdt.core.compiler.ITerminalSymbols;
import org.eclipse.compare.contentmergeviewer.ITokenComparator;
import org.eclipse.compare.rangedifferencer.IRangeComparator;
/**
* A comparator for Java tokens.
*/
class JavaTokenComparator implements ITokenComparator {
private String fText;
private boolean fShouldEscape= true;
private int fCount;
private int[] fStarts;
private int[] fLengths;
/**
* Creates a TokenComparator for the given string.
|
13,907 |
Bug 13907 Scanner does not report whitespace tokens at end of input
|
The Scanner does not report the whitespace at the end of its input. The whitespace is added to the EOF token. If I explicitely ask for whitespace this behavior seems to be wrong (comments are reported correctly). Run the following testcase: import org.eclipse.jdt.core.compiler.InvalidInputException; import org.eclipse.jdt.internal.compiler.parser.Scanner; import org.eclipse.jdt.core.compiler.ITerminalSymbols; public class ScannerTest { public static void main(String[] args) { String input= "package com.ibm.itp.compare.ui; //foo \r\n"; int l= input.length(); Scanner scanner= new Scanner(true, true); // returns comments & whitespace char[] chars= new char[l]; input.getChars(0, l, chars, 0); scanner.setSource(chars); try { for (;;) { int t= 0; switch (t= scanner.getNextToken()) { case ITerminalSymbols.TokenNameEOF: System.out.println("EOF"); return; case ITerminalSymbols.TokenNameWHITESPACE: System.out.println("WS"); break; case ITerminalSymbols.TokenNameCOMMENT_LINE: System.out.println("COMMENT"); break; case ITerminalSymbols.TokenNameSEMICOLON: System.out.println("SEMICOLON"); break; default: System.out.println("Token: " + t); break; } } } catch (InvalidInputException ex) { } } }
|
verified fixed
|
606480f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T09:01:56Z | 2002-04-16T15:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaTokenComparator.java
|
*/
public JavaTokenComparator(String text, boolean shouldEscape) {
Assert.isNotNull(text);
fText= text;
fShouldEscape= shouldEscape;
int length= fText.length();
fStarts= new int[length];
fLengths= new int[length];
fCount= 0;
Scanner scanner= new Scanner(true, true);
scanner.setSource(fText.toCharArray());
try {
while (scanner.getNextToken() != ITerminalSymbols.TokenNameEOF) {
fStarts[fCount]= scanner.startPosition;
fLengths[fCount]= scanner.currentPosition - fStarts[fCount];
fCount++;
}
} catch (InvalidInputException ex) {
}
}
/**
* Returns the number of token in the string.
*
* @return number of token in the string
*/
public int getRangeCount() {
|
13,907 |
Bug 13907 Scanner does not report whitespace tokens at end of input
|
The Scanner does not report the whitespace at the end of its input. The whitespace is added to the EOF token. If I explicitely ask for whitespace this behavior seems to be wrong (comments are reported correctly). Run the following testcase: import org.eclipse.jdt.core.compiler.InvalidInputException; import org.eclipse.jdt.internal.compiler.parser.Scanner; import org.eclipse.jdt.core.compiler.ITerminalSymbols; public class ScannerTest { public static void main(String[] args) { String input= "package com.ibm.itp.compare.ui; //foo \r\n"; int l= input.length(); Scanner scanner= new Scanner(true, true); // returns comments & whitespace char[] chars= new char[l]; input.getChars(0, l, chars, 0); scanner.setSource(chars); try { for (;;) { int t= 0; switch (t= scanner.getNextToken()) { case ITerminalSymbols.TokenNameEOF: System.out.println("EOF"); return; case ITerminalSymbols.TokenNameWHITESPACE: System.out.println("WS"); break; case ITerminalSymbols.TokenNameCOMMENT_LINE: System.out.println("COMMENT"); break; case ITerminalSymbols.TokenNameSEMICOLON: System.out.println("SEMICOLON"); break; default: System.out.println("Token: " + t); break; } } } catch (InvalidInputException ex) { } } }
|
verified fixed
|
606480f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T09:01:56Z | 2002-04-16T15:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaTokenComparator.java
|
return fCount;
}
/* (non Javadoc)
* see ITokenComparator.getTokenStart
*/
public int getTokenStart(int index) {
if (index < fCount)
return fStarts[index];
return fText.length();
}
/* (non Javadoc)
* see ITokenComparator.getTokenLength
*/
public int getTokenLength(int index) {
if (index < fCount)
return fLengths[index];
return 0;
}
/**
* Returns <code>true</code> if a token given by the first index
* matches a token specified by the other <code>IRangeComparator</code> and index.
*
* @param thisIndex the number of the token within this range comparator
* @param other the range comparator to compare this with
* @param otherIndex the number of the token within the other comparator
* @return <code>true</code> if the token are equal
*/
public boolean rangesEqual(int thisIndex, IRangeComparator other, int otherIndex) {
if (other != null && getClass() == other.getClass()) {
|
13,907 |
Bug 13907 Scanner does not report whitespace tokens at end of input
|
The Scanner does not report the whitespace at the end of its input. The whitespace is added to the EOF token. If I explicitely ask for whitespace this behavior seems to be wrong (comments are reported correctly). Run the following testcase: import org.eclipse.jdt.core.compiler.InvalidInputException; import org.eclipse.jdt.internal.compiler.parser.Scanner; import org.eclipse.jdt.core.compiler.ITerminalSymbols; public class ScannerTest { public static void main(String[] args) { String input= "package com.ibm.itp.compare.ui; //foo \r\n"; int l= input.length(); Scanner scanner= new Scanner(true, true); // returns comments & whitespace char[] chars= new char[l]; input.getChars(0, l, chars, 0); scanner.setSource(chars); try { for (;;) { int t= 0; switch (t= scanner.getNextToken()) { case ITerminalSymbols.TokenNameEOF: System.out.println("EOF"); return; case ITerminalSymbols.TokenNameWHITESPACE: System.out.println("WS"); break; case ITerminalSymbols.TokenNameCOMMENT_LINE: System.out.println("COMMENT"); break; case ITerminalSymbols.TokenNameSEMICOLON: System.out.println("SEMICOLON"); break; default: System.out.println("Token: " + t); break; } } } catch (InvalidInputException ex) { } } }
|
verified fixed
|
606480f
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T09:01:56Z | 2002-04-16T15:13:20Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaTokenComparator.java
|
JavaTokenComparator tc= (JavaTokenComparator) other;
int thisLen= getTokenLength(thisIndex);
int otherLen= tc.getTokenLength(otherIndex);
if (thisLen == otherLen)
return fText.regionMatches(false, getTokenStart(thisIndex), tc.fText, tc.getTokenStart(otherIndex), thisLen);
}
return false;
}
/**
* Aborts the comparison if the number of tokens is too large.
*
* @return <code>true</code> to abort a token comparison
*/
public boolean skipRangeComparison(int length, int max, IRangeComparator other) {
if (!fShouldEscape)
return false;
if (getRangeCount() < 50 || other.getRangeCount() < 50)
return false;
if (max < 100)
return false;
if (length < 100)
return false;
if (max > 800)
return true;
if (length < max / 4)
return false;
return true;
}
}
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
package org.eclipse.jdt.internal.ui.javaeditor;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.graphics.Rectangle;
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Layout;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.DocumentCommand;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ILineTracker;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextOperationTarget;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.text.Position;
import org.eclipse.jface.text.contentassist.ContentAssistant;
import org.eclipse.jface.text.contentassist.IContentAssistant;
import org.eclipse.jface.text.source.Annotation;
import org.eclipse.jface.text.source.IAnnotationModel;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.text.source.IVerticalRuler;
import org.eclipse.jface.text.source.SourceViewerConfiguration;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.actions.ActionGroup;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.dialogs.SaveAsDialog;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import org.eclipse.ui.texteditor.MarkerAnnotation;
import org.eclipse.ui.texteditor.MarkerUtilities;
import org.eclipse.ui.texteditor.TextOperationAction;
import org.eclipse.ui.views.tasklist.TaskList;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragment;
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.IProblemRequestor;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.actions.CompositeActionGroup;
import org.eclipse.jdt.internal.ui.javaeditor.structureselection.SelectionHistory;
import org.eclipse.jdt.internal.ui.javaeditor.structureselection.StructureSelectEnclosingAction;
import org.eclipse.jdt.internal.ui.javaeditor.structureselection.StructureSelectHistoryAction;
import org.eclipse.jdt.internal.ui.javaeditor.structureselection.StructureSelectNextAction;
import org.eclipse.jdt.internal.ui.javaeditor.structureselection.StructureSelectPreviousAction;
import org.eclipse.jdt.internal.ui.javaeditor.structureselection.StructureSelectionAction;
import org.eclipse.jdt.internal.ui.preferences.WorkInProgressPreferencePage;
import org.eclipse.jdt.internal.ui.refactoring.actions.SurroundWithTryCatchAction;
import org.eclipse.jdt.internal.ui.reorg.ReorgGroup;
import org.eclipse.jdt.internal.ui.text.ContentAssistPreference;
import org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionSourceViewer;
import org.eclipse.jdt.internal.ui.text.java.IReconcilingParticipant;
import org.eclipse.jdt.ui.IContextMenuConstants;
import org.eclipse.jdt.ui.IWorkingCopyManager;
import org.eclipse.jdt.ui.actions.GenerateActionGroup;
import org.eclipse.jdt.ui.actions.OpenEditorActionGroup;
import org.eclipse.jdt.ui.actions.OpenViewActionGroup;
import org.eclipse.jdt.ui.actions.ShowActionGroup;
import org.eclipse.jdt.ui.text.JavaTextTools;
/**
* Java specific text editor.
*/
public class CompilationUnitEditor extends JavaEditor implements IReconcilingParticipant {
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
interface ITextConverter {
void customizeDocumentCommand(IDocument document, DocumentCommand command);
};
class AdaptedRulerLayout extends Layout {
protected int fGap;
protected AdaptedSourceViewer fAdaptedSourceViewer;
protected AdaptedRulerLayout(int gap, AdaptedSourceViewer asv) {
fGap= gap;
fAdaptedSourceViewer= asv;
}
protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) {
Control[] children= composite.getChildren();
Point s= children[children.length - 1].computeSize(SWT.DEFAULT, SWT.DEFAULT, flushCache);
if (fAdaptedSourceViewer.isVerticalRulerVisible())
s.x += fAdaptedSourceViewer.getVerticalRuler().getWidth() + fGap;
return s;
}
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
protected void layout(Composite composite, boolean flushCache) {
Rectangle clArea= composite.getClientArea();
if (fAdaptedSourceViewer.isVerticalRulerVisible()) {
StyledText textWidget= fAdaptedSourceViewer.getTextWidget();
Rectangle trim= textWidget.computeTrim(0, 0, 0, 0);
int scrollbarHeight= trim.height;
IVerticalRuler vr= fAdaptedSourceViewer.getVerticalRuler();
int vrWidth=vr.getWidth();
int orWidth= 0;
if (fAdaptedSourceViewer.isOverviewRulerVisible()) {
OverviewRuler or= fAdaptedSourceViewer.getOverviewRuler();
orWidth= or.getWidth();
or.getControl().setBounds(clArea.width - orWidth, scrollbarHeight, orWidth, clArea.height - 3*scrollbarHeight);
}
textWidget.setBounds(vrWidth + fGap, 0, clArea.width - vrWidth - orWidth - 2*fGap, clArea.height);
vr.getControl().setBounds(0, 0, vrWidth, clArea.height - scrollbarHeight);
} else {
StyledText textWidget= fAdaptedSourceViewer.getTextWidget();
textWidget.setBounds(0, 0, clArea.width, clArea.height);
}
}
};
class AdaptedSourceViewer extends JavaCorrectionSourceViewer {
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
private List fTextConverters;
private OverviewRuler fOverviewRuler;
private boolean fIsOverviewRulerVisible;
private IVerticalRuler fCachedVerticalRuler;
private boolean fCachedIsVerticalRulerVisible;
public AdaptedSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
super(parent, ruler, styles, CompilationUnitEditor.this);
fCachedVerticalRuler= ruler;
fCachedIsVerticalRulerVisible= (ruler != null);
fOverviewRuler= new OverviewRuler(VERTICAL_RULER_WIDTH);
delayedCreateControl(parent, styles);
}
/*
* @see ISourceViewer#showAnnotations(boolean)
*/
public void showAnnotations(boolean show) {
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
fCachedIsVerticalRulerVisible= (show && fCachedVerticalRuler != null);
super.showAnnotations(show);
}
public IContentAssistant getContentAssistant() {
return fContentAssistant;
}
/*
* @see ITextOperationTarget#doOperation(int)
*/
public void doOperation(int operation) {
if (getTextWidget() == null)
return;
switch (operation) {
case CONTENTASSIST_PROPOSALS:
String msg= fContentAssistant.showPossibleCompletions();
setStatusLineErrorMessage(msg);
return;
}
super.doOperation(operation);
}
public void insertTextConverter(ITextConverter textConverter, int index) {
throw new UnsupportedOperationException();
}
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
public void addTextConverter(ITextConverter textConverter) {
if (fTextConverters == null) {
fTextConverters= new ArrayList(1);
fTextConverters.add(textConverter);
} else if (!fTextConverters.contains(textConverter))
fTextConverters.add(textConverter);
}
public void removeTextConverter(ITextConverter textConverter) {
if (fTextConverters != null) {
fTextConverters.remove(textConverter);
if (fTextConverters.size() == 0)
fTextConverters= null;
}
}
/*
* @see TextViewer#customizeDocumentCommand(DocumentCommand)
*/
protected void customizeDocumentCommand(DocumentCommand command) {
super.customizeDocumentCommand(command);
if (fTextConverters != null) {
for (Iterator e = fTextConverters.iterator(); e.hasNext();)
((ITextConverter) e.next()).customizeDocumentCommand(getDocument(), command);
}
}
public IVerticalRuler getVerticalRuler() {
return fCachedVerticalRuler;
}
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
public boolean isVerticalRulerVisible() {
return fCachedIsVerticalRulerVisible;
}
public OverviewRuler getOverviewRuler() {
return fOverviewRuler;
}
/*
* @see TextViewer#createControl(Composite, int)
*/
protected void createControl(Composite parent, int styles) {
}
protected void delayedCreateControl(Composite parent, int styles) {
super.createControl(parent, styles);
Control control= getControl();
if (control instanceof Composite) {
Composite composite= (Composite) control;
composite.setLayout(new AdaptedRulerLayout(GAP_SIZE, this));
fOverviewRuler.createControl(composite, this);
}
}
public void hideOverviewRuler() {
fIsOverviewRulerVisible= false;
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
Control control= getControl();
if (control instanceof Composite) {
Composite composite= (Composite) control;
composite.layout();
}
}
public void showOverviewRuler() {
fIsOverviewRulerVisible= true;
Control control= getControl();
if (control instanceof Composite) {
Composite composite= (Composite) control;
composite.layout();
}
}
public boolean isOverviewRulerVisible() {
return fIsOverviewRulerVisible;
}
/*
* @see ISourceViewer#setDocument(IDocument, IAnnotationModel, int, int)
*/
public void setDocument(IDocument document, IAnnotationModel annotationModel, int visibleRegionOffset, int visibleRegionLength) {
super.setDocument(document, annotationModel, visibleRegionOffset, visibleRegionLength);
fOverviewRuler.setModel(annotationModel);
}
};
static class TabConverter implements ITextConverter {
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
private int fTabRatio;
private ILineTracker fLineTracker;
public TabConverter() {
}
public void setNumberOfSpacesPerTab(int ratio) {
fTabRatio= ratio;
}
public void setLineTracker(ILineTracker lineTracker) {
fLineTracker= lineTracker;
}
private int insertTabString(StringBuffer buffer, int offsetInLine) {
int remainder= offsetInLine % fTabRatio;
remainder= fTabRatio - remainder;
for (int i= 0; i < remainder; i++)
buffer.append(' ');
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
return remainder;
}
public void customizeDocumentCommand(IDocument document, DocumentCommand command) {
String text= command.text;
if (text == null)
return;
int index= text.indexOf('\t');
if (index > -1) {
StringBuffer buffer= new StringBuffer();
fLineTracker.set(command.text);
int lines= fLineTracker.getNumberOfLines();
try {
for (int i= 0; i < lines; i++) {
int offset= fLineTracker.getLineOffset(i);
int endOffset= offset + fLineTracker.getLineLength(i);
String line= text.substring(offset, endOffset);
int position= 0;
if (i == 0) {
IRegion firstLine= document.getLineInformationOfOffset(command.offset);
position= command.offset - firstLine.getOffset();
}
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
int length= line.length();
for (int j= 0; j < length; j++) {
char c= line.charAt(j);
if (c == '\t') {
position += insertTabString(buffer, position);
} else {
buffer.append(c);
++ position;
}
}
}
command.text= buffer.toString();
} catch (BadLocationException x) {
}
}
}
};
private final static String CODE_FORMATTER_TAB_SIZE= "org.eclipse.jdt.core.formatter.tabulation.size";
private final static String CODE_FORMATTER_TAB_CHAR= "org.eclipse.jdt.core.formatter.tabulation.char";
public final static String MATCHING_BRACKETS= "matchingBrackets";
public final static String MATCHING_BRACKETS_COLOR= "matchingBracketsColor";
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
public final static String CURRENT_LINE= "currentLine";
public final static String CURRENT_LINE_COLOR= "currentLineColor";
public final static String PRINT_MARGIN= "printMargin";
public final static String PRINT_MARGIN_COLOR= "printMarginColor";
public final static String PRINT_MARGIN_COLUMN= "printMarginColumn";
public final static String SPACES_FOR_TABS= "spacesForTabs";
public final static String PROBLEM_INDICATION= "problemIndication";
public final static String PROBLEM_INDICATION_COLOR= "problemIndicationColor";
public final static String OVERVIEW_RULER= "overviewRuler";
protected ISelectionChangedListener fStatusLineClearer;
protected ISavePolicy fSavePolicy;
private JavaEditorErrorTickUpdater fJavaEditorErrorTickUpdater;
private PaintManager fPaintManager;
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
private BracketPainter fBracketPainter;
private LinePainter fLinePainter;
private PrintMarginPainter fPrintMarginPainter;
private ProblemPainter fProblemPainter;
private TabConverter fTabConverter;
private SelectionHistory fSelectionHistory;
CompositeActionGroup fStandardActionGroups;
/**
* Creates a new compilation unit editor.
*/
public CompilationUnitEditor() {
super();
setDocumentProvider(JavaPlugin.getDefault().getCompilationUnitDocumentProvider());
setEditorContextMenuId("#CompilationUnitEditorContext");
setRulerContextMenuId("#CompilationUnitRulerContext");
setOutlinerContextMenuId("#CompilationUnitOutlinerContext");
setHelpContextId(IJavaHelpContextIds.COMPILATION_UNIT_EDITOR);
fSavePolicy= null;
fJavaEditorErrorTickUpdater= new JavaEditorErrorTickUpdater(this);
}
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
/*
* @see AbstractTextEditor#createActions()
*/
protected void createActions() {
super.createActions();
setAction("CorrectionAssistProposal", new TextOperationAction(JavaEditorMessages.getResourceBundle(), "CorrectionAssistProposal.", this, JavaCorrectionSourceViewer.CORRECTIONASSIST_PROPOSALS));
setAction("ContentAssistProposal", new TextOperationAction(JavaEditorMessages.getResourceBundle(), "ContentAssistProposal.", this, ISourceViewer.CONTENTASSIST_PROPOSALS));
setAction("ContentAssistContextInformation", new TextOperationAction(JavaEditorMessages.getResourceBundle(), "ContentAssistContextInformation.", this, ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION));
setAction("AddImportOnSelection", new AddImportOnSelectionAction(this));
setAction("OrganizeImports", new OrganizeImportsAction(this));
setAction("Comment", new TextOperationAction(JavaEditorMessages.getResourceBundle(), "Comment.", this, ITextOperationTarget.PREFIX));
setAction("Uncomment", new TextOperationAction(JavaEditorMessages.getResourceBundle(), "Uncomment.", this, ITextOperationTarget.STRIP_PREFIX));
setAction("Format", new TextOperationAction(JavaEditorMessages.getResourceBundle(), "Format.", this, ISourceViewer.FORMAT));
setAction("SurroundWithTryCatch", new SurroundWithTryCatchAction(this));
fSelectionHistory= new SelectionHistory(this);
setAction(StructureSelectionAction.ENCLOSING, new StructureSelectEnclosingAction(this, fSelectionHistory));
setAction(StructureSelectionAction.NEXT, new StructureSelectNextAction(this, fSelectionHistory));
setAction(StructureSelectionAction.PREVIOUS, new StructureSelectPreviousAction(this, fSelectionHistory));
StructureSelectHistoryAction historyAction= new StructureSelectHistoryAction(this, fSelectionHistory);
setAction(StructureSelectionAction.HISTORY, historyAction);
fSelectionHistory.setHistoryAction(historyAction);
fStandardActionGroups= new CompositeActionGroup(new ActionGroup[] {
new OpenEditorActionGroup(this), new OpenViewActionGroup(this), new ShowActionGroup(this), new GenerateActionGroup(this)});
}
/*
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
* @see JavaEditor#getElementAt(int)
*/
protected IJavaElement getElementAt(int offset) {
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
ICompilationUnit unit= manager.getWorkingCopy(getEditorInput());
if (unit != null) {
synchronized (unit) {
try {
unit.reconcile();
return unit.getElementAt(offset);
} catch (JavaModelException x) {
}
}
}
return null;
}
/*
* @see JavaEditor#getCorrespondingElement(IJavaElement)
*/
protected IJavaElement getCorrespondingElement(IJavaElement element) {
try {
return EditorUtility.getWorkingCopy(element, true);
} catch (JavaModelException x) {
}
return null;
}
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
/*
* @see AbstractTextEditor#editorContextMenuAboutToShow(IMenuManager)
*/
public void editorContextMenuAboutToShow(IMenuManager menu) {
super.editorContextMenuAboutToShow(menu);
/*
* http://dev.eclipse.org/bugs/show_bug.cgi?id=8735
* Removed duplicates of Edit menu entries to shorten context menu.
* Will be reworked for overal context menu reorganization.
*/
addAction(menu, IContextMenuConstants.GROUP_GENERATE, "AddImportOnSelection");
addAction(menu, IContextMenuConstants.GROUP_GENERATE, "OrganizeImports");
addAction(menu, IContextMenuConstants.GROUP_GENERATE, "CorrectionAssistProposal");
addAction(menu, IContextMenuConstants.GROUP_GENERATE, "SurroundWithTryCatch");
addAction(menu, ITextEditorActionConstants.GROUP_EDIT, "Comment");
addAction(menu, ITextEditorActionConstants.GROUP_EDIT, "Uncomment");
addAction(menu, ITextEditorActionConstants.GROUP_EDIT, "Format");
}
/*
* @see JavaEditor#createOutlinePage()
*/
protected JavaOutlinePage createOutlinePage() {
JavaOutlinePage page= super.createOutlinePage();
page.setAction("OrganizeImports", new OrganizeImportsAction(this));
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
IAction deleteElement= ReorgGroup.createDeleteAction(page);
page.setAction("DeleteElement", deleteElement);
return page;
}
/*
* @see JavaEditor#setOutlinePageInput(JavaOutlinePage, IEditorInput)
*/
protected void setOutlinePageInput(JavaOutlinePage page, IEditorInput input) {
if (page != null) {
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
page.setInput(manager.getWorkingCopy(input));
}
}
/*
* @see AbstractTextEditor#performSaveOperation(WorkspaceModifyOperation, IProgressMonitor)
*/
protected void performSaveOperation(WorkspaceModifyOperation operation, IProgressMonitor progressMonitor) {
IDocumentProvider p= getDocumentProvider();
if (p instanceof CompilationUnitDocumentProvider) {
CompilationUnitDocumentProvider cp= (CompilationUnitDocumentProvider) p;
cp.setSavePolicy(fSavePolicy);
}
try {
super.performSaveOperation(operation, progressMonitor);
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
} finally {
if (p instanceof CompilationUnitDocumentProvider) {
CompilationUnitDocumentProvider cp= (CompilationUnitDocumentProvider) p;
cp.setSavePolicy(null);
}
}
}
/*
* @see AbstractTextEditor#doSave(IProgressMonitor)
*/
public void doSave(IProgressMonitor progressMonitor) {
IDocumentProvider p= getDocumentProvider();
if (p == null)
return;
if (p.isDeleted(getEditorInput())) {
if (isSaveAsAllowed()) {
/*
* 1GEUSSR: ITPUI:ALL - User should never loose changes made in the editors.
* Changed Behavior to make sure that if called inside a regular save (because
* of deletion of input element) there is a way to report back to the caller.
*/
performSaveAs(progressMonitor);
} else {
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
/*
* 1GF5YOX: ITPJUI:ALL - Save of delete file claims it's still there
* Missing resources.
*/
Shell shell= getSite().getShell();
MessageDialog.openError(shell, JavaEditorMessages.getString("CompilationUnitEditor.error.saving.title1"), JavaEditorMessages.getString("CompilationUnitEditor.error.saving.message1"));
}
} else {
setStatusLineErrorMessage(null);
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
ICompilationUnit unit= manager.getWorkingCopy(getEditorInput());
if (unit != null) {
synchronized (unit) {
performSaveOperation(createSaveOperation(false), progressMonitor);
}
} else
performSaveOperation(createSaveOperation(false), progressMonitor);
}
}
/**
* Jumps to the error next according to the given direction.
*/
public void gotoError(boolean forward) {
ISelectionProvider provider= getSelectionProvider();
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
if (fStatusLineClearer != null) {
provider.removeSelectionChangedListener(fStatusLineClearer);
fStatusLineClearer= null;
}
ITextSelection s= (ITextSelection) provider.getSelection();
IMarker nextError= getNextError(s.getOffset(), forward);
if (nextError != null) {
gotoMarker(nextError);
IWorkbenchPage page= getSite().getPage();
IViewPart view= view= page.findView("org.eclipse.ui.views.TaskList");
if (view instanceof TaskList) {
StructuredSelection ss= new StructuredSelection(nextError);
((TaskList) view).setSelection(ss, true);
}
setStatusLineErrorMessage(nextError.getAttribute(IMarker.MESSAGE, ""));
} else {
setStatusLineErrorMessage(null);
}
}
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
/**
* Sets the given message as error message to this editor's status line.
* @param msg message to be set
*/
protected void setStatusLineErrorMessage(String msg) {
getStatusLineManager().setErrorMessage(msg);
if (msg == null || msg.trim().length() == 0) {
if (fStatusLineClearer != null) {
getSelectionProvider().removeSelectionChangedListener(fStatusLineClearer);
fStatusLineClearer= null;
}
} else if (fStatusLineClearer == null) {
fStatusLineClearer= new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
getSelectionProvider().removeSelectionChangedListener(fStatusLineClearer);
fStatusLineClearer= null;
getStatusLineManager().setErrorMessage(null);
}
};
getSelectionProvider().addSelectionChangedListener(fStatusLineClearer);
}
}
private IMarker getNextError(int offset, boolean forward) {
IMarker nextError= null;
IDocument document= getDocumentProvider().getDocument(getEditorInput());
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
int endOfDocument= document.getLength();
int distance= 0;
IAnnotationModel model= getDocumentProvider().getAnnotationModel(getEditorInput());
Iterator e= model.getAnnotationIterator();
while (e.hasNext()) {
Annotation a= (Annotation) e.next();
if (a instanceof MarkerAnnotation) {
MarkerAnnotation ma= (MarkerAnnotation) a;
IMarker marker= ma.getMarker();
if (MarkerUtilities.isMarkerType(marker, IMarker.PROBLEM)) {
Position p= model.getPosition(a);
if (!p.includes(offset)) {
int currentDistance= 0;
if (forward) {
currentDistance= p.getOffset() - offset;
if (currentDistance < 0)
currentDistance= endOfDocument - offset + p.getOffset();
} else {
currentDistance= offset - p.getOffset();
if (currentDistance < 0)
currentDistance= offset + endOfDocument - p.getOffset();
}
if (nextError == null || currentDistance < distance) {
distance= currentDistance;
nextError= marker;
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
}
}
}
}
}
return nextError;
}
/*
* @see AbstractTextEditor#isSaveAsAllowed()
*/
public boolean isSaveAsAllowed() {
return true;
}
/*
* 1GF7WG9: ITPJUI:ALL - EXCEPTION: "Save As..." always fails
*/
protected IPackageFragment getPackage(IWorkspaceRoot root, IPath path) {
if (path.segmentCount() == 1) {
IProject project= root.getProject(path.toString());
if (project != null) {
IJavaProject jProject= JavaCore.create(project);
if (jProject != null) {
try {
IJavaElement element= jProject.findElement(new Path(""));
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
if (element instanceof IPackageFragment) {
IPackageFragment fragment= (IPackageFragment) element;
IJavaElement parent= fragment.getParent();
if (parent instanceof IPackageFragmentRoot) {
IPackageFragmentRoot pRoot= (IPackageFragmentRoot) parent;
if ( !pRoot.isArchive() && !pRoot.isExternal() && path.equals(pRoot.getPath()))
return fragment;
}
}
} catch (JavaModelException x) {
}
}
}
return null;
} else if (path.segmentCount() > 1) {
IFolder folder= root.getFolder(path);
IJavaElement element= JavaCore.create(folder);
if (element instanceof IPackageFragment)
return (IPackageFragment) element;
}
return null;
}
/*
* 1GEUSSR: ITPUI:ALL - User should never loose changes made in the editors.
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
* Changed behavior to make sure that if called inside a regular save (because
* of deletion of input element) there is a way to report back to the caller.
*/
protected void performSaveAs(IProgressMonitor progressMonitor) {
Shell shell= getSite().getShell();
SaveAsDialog dialog= new SaveAsDialog(shell);
IEditorInput input = getEditorInput();
IFile original= null;
if (input instanceof IFileEditorInput)
original= ((IFileEditorInput) input).getFile();
if (original != null)
dialog.setOriginalFile(original);
if (dialog.open() == Dialog.CANCEL) {
if (progressMonitor != null)
progressMonitor.setCanceled(true);
return;
}
IPath filePath= dialog.getResult();
if (filePath == null) {
if (progressMonitor != null)
progressMonitor.setCanceled(true);
return;
}
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
filePath= filePath.removeTrailingSeparator();
final String fileName= filePath.lastSegment();
IPath folderPath= filePath.removeLastSegments(1);
if (folderPath == null) {
if (progressMonitor != null)
progressMonitor.setCanceled(true);
return;
}
IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
/*
* 1GF7WG9: ITPJUI:ALL - EXCEPTION: "Save As..." always fails
*/
final IPackageFragment fragment= getPackage(root, folderPath);
IFile file= root.getFile(filePath);
/*
* Fix for http://dev.eclipse.org/bugs/show_bug.cgi?id=8873
* Problem caused by http://dev.eclipse.org/bugs/show_bug.cgi?id=9351
* Will be removed if #9351 is solved.
*/
if (original != null && original.equals(file)) {
doSave(progressMonitor);
return;
}
final FileEditorInput newInput= new FileEditorInput(file);
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
WorkspaceModifyOperation op= new WorkspaceModifyOperation() {
public void execute(final IProgressMonitor monitor) throws CoreException {
if (fragment != null) {
try {
IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();
ICompilationUnit unit= manager.getWorkingCopy(getEditorInput());
/*
* 1GJXY0L: ITPJUI:WINNT - NPE during save As in Java editor
* Introduced null check, just go on in the null case
*/
if (unit != null) {
/*
* 1GF5YOX: ITPJUI:ALL - Save of delete file claims it's still there
* Changed false to true.
*/
unit.copy(fragment, null, fileName, true, monitor);
return;
}
} catch (JavaModelException x) {
}
}
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
/*
* 1GF5YOX: ITPJUI:ALL - Save of delete file claims it's still there
* Changed false to true.
*/
getDocumentProvider().saveDocument(monitor, newInput, getDocumentProvider().getDocument(getEditorInput()), true);
}
};
boolean success= false;
try {
if (fragment == null)
getDocumentProvider().aboutToChange(newInput);
new ProgressMonitorDialog(shell).run(false, true, op);
setInput(newInput);
success= true;
} catch (InterruptedException x) {
} catch (InvocationTargetException x) {
/*
* 1GF5YOX: ITPJUI:ALL - Save of delete file claims it's still there
* Missing resources.
*/
Throwable t= x.getTargetException();
if (t instanceof CoreException) {
CoreException cx= (CoreException) t;
ErrorDialog.openError(shell, JavaEditorMessages.getString("CompilationUnitEditor.error.saving.title2"), JavaEditorMessages.getString("CompilationUnitEditor.error.saving.message2"), cx.getStatus());
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
} else {
MessageDialog.openError(shell, JavaEditorMessages.getString("CompilationUnitEditor.error.saving.title3"), JavaEditorMessages.getString("CompilationUnitEditor.error.saving.message3") + t.getMessage());
}
} finally {
if (fragment == null)
getDocumentProvider().changed(newInput);
if (progressMonitor != null)
progressMonitor.setCanceled(!success);
}
}
/*
* @see AbstractTextEditor#doSetInput(IEditorInput)
*/
protected void doSetInput(IEditorInput input) throws CoreException {
super.doSetInput(input);
fJavaEditorErrorTickUpdater.setAnnotationModel(getDocumentProvider().getAnnotationModel(input));
configureTabConverter();
}
private void startBracketHighlighting() {
if (fBracketPainter == null) {
ISourceViewer sourceViewer= getSourceViewer();
fBracketPainter= new BracketPainter(sourceViewer);
fBracketPainter.setHighlightColor(getColor(MATCHING_BRACKETS_COLOR));
fPaintManager.addPainter(fBracketPainter);
}
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
}
private void stopBracketHighlighting() {
if (fBracketPainter != null) {
fPaintManager.removePainter(fBracketPainter);
fBracketPainter.deactivate(true);
fBracketPainter.dispose();
fBracketPainter= null;
}
}
private boolean isBracketHighlightingEnabled() {
IPreferenceStore store= getPreferenceStore();
return store.getBoolean(MATCHING_BRACKETS);
}
private void startLineHighlighting() {
if (fLinePainter == null) {
ISourceViewer sourceViewer= getSourceViewer();
fLinePainter= new LinePainter(sourceViewer);
fLinePainter.setHighlightColor(getColor(CURRENT_LINE_COLOR));
fPaintManager.addPainter(fLinePainter);
}
}
private void stopLineHighlighting() {
if (fLinePainter != null) {
fPaintManager.removePainter(fLinePainter);
fLinePainter.deactivate(true);
fLinePainter.dispose();
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
fLinePainter= null;
}
}
private boolean isLineHighlightingEnabled() {
IPreferenceStore store= getPreferenceStore();
return store.getBoolean(CURRENT_LINE);
}
private void startShowingPrintMargin() {
if (fPrintMarginPainter == null) {
fPrintMarginPainter= new PrintMarginPainter(getSourceViewer());
fPrintMarginPainter.setMarginRulerColor(getColor(PRINT_MARGIN_COLOR));
fPrintMarginPainter.setMarginRulerColumn(getPreferenceStore().getInt(PRINT_MARGIN_COLUMN));
fPaintManager.addPainter(fPrintMarginPainter);
}
}
private void stopShowingPrintMargin() {
if (fPrintMarginPainter != null) {
fPaintManager.removePainter(fPrintMarginPainter);
fPrintMarginPainter.deactivate(true);
fPrintMarginPainter.dispose();
fPrintMarginPainter= null;
}
}
private boolean isShowingPrintMarginEnabled() {
IPreferenceStore store= getPreferenceStore();
return store.getBoolean(PRINT_MARGIN);
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
}
private void startProblemIndication() {
if (fProblemPainter == null) {
fProblemPainter= new ProblemPainter(this, getSourceViewer());
fProblemPainter.setHighlightColor(getColor(PROBLEM_INDICATION_COLOR));
fPaintManager.addPainter(fProblemPainter);
}
}
private void stopProblemIndication() {
if (fProblemPainter != null) {
fPaintManager.removePainter(fProblemPainter);
fProblemPainter.deactivate(true);
fProblemPainter.dispose();
fProblemPainter= null;
}
}
private boolean isProblemIndicationEnabled() {
IPreferenceStore store= getPreferenceStore();
return store.getBoolean(PROBLEM_INDICATION);
}
private void configureTabConverter() {
if (fTabConverter != null) {
IDocumentProvider provider= getDocumentProvider();
if (provider instanceof CompilationUnitDocumentProvider) {
CompilationUnitDocumentProvider cup= (CompilationUnitDocumentProvider) provider;
fTabConverter.setLineTracker(cup.createLineTracker(getEditorInput()));
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
}
}
}
private void startTabConversion() {
if (fTabConverter == null) {
fTabConverter= new TabConverter();
configureTabConverter();
fTabConverter.setNumberOfSpacesPerTab(getPreferenceStore().getInt(CODE_FORMATTER_TAB_SIZE));
AdaptedSourceViewer asv= (AdaptedSourceViewer) getSourceViewer();
asv.addTextConverter(fTabConverter);
}
}
private void stopTabConversion() {
if (fTabConverter != null) {
AdaptedSourceViewer asv= (AdaptedSourceViewer) getSourceViewer();
asv.removeTextConverter(fTabConverter);
fTabConverter= null;
}
}
private boolean isTabConversionEnabled() {
IPreferenceStore store= getPreferenceStore();
return store.getBoolean(SPACES_FOR_TABS);
}
private void startShowingOverviewRuler() {
AdaptedSourceViewer asv= (AdaptedSourceViewer) getSourceViewer();
asv.showOverviewRuler();
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
}
private void stopShowingOverviewRuler() {
AdaptedSourceViewer asv= (AdaptedSourceViewer) getSourceViewer();
asv.hideOverviewRuler();
}
private boolean isShowingOverviewRuler() {
IPreferenceStore store= getPreferenceStore();
return store.getBoolean(OVERVIEW_RULER);
}
private Color getColor(String key) {
RGB rgb= PreferenceConverter.getColor(getPreferenceStore(), key);
return getColor(rgb);
}
private Color getColor(RGB rgb) {
JavaTextTools textTools= JavaPlugin.getDefault().getJavaTextTools();
return textTools.getColorManager().getColor(rgb);
}
/*
* @see AbstractTextEditor#dispose()
*/
public void dispose() {
if (fJavaEditorErrorTickUpdater != null) {
fJavaEditorErrorTickUpdater.setAnnotationModel(null);
fJavaEditorErrorTickUpdater= null;
}
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
if (fSelectionHistory != null)
fSelectionHistory.dispose();
stopBracketHighlighting();
stopLineHighlighting();
if (fPaintManager != null) {
fPaintManager.dispose();
fPaintManager= null;
}
super.dispose();
}
/*
* @see AbstractTextEditor#createPartControl(Composite)
*/
public void createPartControl(Composite parent) {
super.createPartControl(parent);
fPaintManager= new PaintManager(getSourceViewer());
if (isBracketHighlightingEnabled())
startBracketHighlighting();
if (isLineHighlightingEnabled())
startLineHighlighting();
if (isShowingPrintMarginEnabled())
startShowingPrintMargin();
if (isProblemIndicationEnabled())
startProblemIndication();
if (isTabConversionEnabled())
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
startTabConversion();
if (isShowingOverviewRuler())
startShowingOverviewRuler();
}
/*
* @see AbstractTextEditor#handlePreferenceStoreChanged(PropertyChangeEvent)
*/
protected void handlePreferenceStoreChanged(PropertyChangeEvent event) {
try {
AdaptedSourceViewer asv= (AdaptedSourceViewer) getSourceViewer();
if (asv != null) {
String p= event.getProperty();
if (CODE_FORMATTER_TAB_SIZE.equals(p) || CODE_FORMATTER_TAB_CHAR.equals(p)) {
SourceViewerConfiguration configuration= getSourceViewerConfiguration();
String[] types= configuration.getConfiguredContentTypes(asv);
for (int i= 0; i < types.length; i++)
asv.setIndentPrefixes(configuration.getIndentPrefixes(asv, types[i]), types[i]);
if (fTabConverter != null)
fTabConverter.setNumberOfSpacesPerTab(getPreferenceStore().getInt(CODE_FORMATTER_TAB_SIZE));
}
if (SPACES_FOR_TABS.equals(p)) {
if (isTabConversionEnabled())
startTabConversion();
else
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
stopTabConversion();
return;
}
if (MATCHING_BRACKETS.equals(p)) {
if (isBracketHighlightingEnabled())
startBracketHighlighting();
else
stopBracketHighlighting();
return;
}
if (MATCHING_BRACKETS_COLOR.equals(p)) {
if (fBracketPainter != null)
fBracketPainter.setHighlightColor(getColor(MATCHING_BRACKETS_COLOR));
return;
}
if (CURRENT_LINE.equals(p)) {
if (isLineHighlightingEnabled())
startLineHighlighting();
else
stopLineHighlighting();
return;
}
if (CURRENT_LINE_COLOR.equals(p)) {
if (fLinePainter != null)
fLinePainter.setHighlightColor(getColor(CURRENT_LINE_COLOR));
return;
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
}
if (PRINT_MARGIN.equals(p)) {
if (isShowingPrintMarginEnabled())
startShowingPrintMargin();
else
stopShowingPrintMargin();
return;
}
if (PRINT_MARGIN_COLOR.equals(p)) {
if (fPrintMarginPainter != null)
fPrintMarginPainter.setMarginRulerColor(getColor(PRINT_MARGIN_COLOR));
return;
}
if (PRINT_MARGIN_COLUMN.equals(p)) {
if (fPrintMarginPainter != null)
fPrintMarginPainter.setMarginRulerColumn(getPreferenceStore().getInt(PRINT_MARGIN_COLUMN));
return;
}
if (PROBLEM_INDICATION.equals(p)) {
if (isProblemIndicationEnabled())
startProblemIndication();
else
stopProblemIndication();
return;
}
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
if (PROBLEM_INDICATION_COLOR.equals(p)) {
if (fProblemPainter != null)
fProblemPainter.setHighlightColor(getColor(PROBLEM_INDICATION_COLOR));
return;
}
if (OVERVIEW_RULER.equals(p)) {
if (isShowingOverviewRuler())
startShowingOverviewRuler();
else
stopShowingOverviewRuler();
return;
}
IContentAssistant c= asv.getContentAssistant();
if (c instanceof ContentAssistant)
ContentAssistPreference.changeConfiguration((ContentAssistant) c, getPreferenceStore(), event);
}
} finally {
super.handlePreferenceStoreChanged(event);
}
}
/*
* @see AbstractTextEditor#affectsTextPresentation(PropertyChangeEvent)
*/
protected boolean affectsTextPresentation(PropertyChangeEvent event) {
String p= event.getProperty();
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
|
boolean affects=MATCHING_BRACKETS_COLOR.equals(p) ||
CURRENT_LINE_COLOR.equals(p) ||
PROBLEM_INDICATION_COLOR.equals(p);
return affects ? affects : super.affectsTextPresentation(event);
}
/*
* @see AbstractTextEditor#createSourceViewer(Composite, IVerticalRuler, int)
*/
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
return new AdaptedSourceViewer(parent, ruler, styles);
}
/*
* @see IReconcilingParticipant#reconciled()
*/
public void reconciled() {
if (!WorkInProgressPreferencePage.synchronizeOutlineOnCursorMove()) {
Shell shell= getSite().getShell();
if (shell != null && !shell.isDisposed()) {
shell.getDisplay().asyncExec(new Runnable() {
public void run() {
synchronizeOutlinePageSelection();
}
});
}
}
}
}
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.preferences;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
import java.util.Iterator;
import java.util.Map;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.List;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.Text;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentPartitioner;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.text.source.SourceViewer;
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.help.DialogPageContextComputer;
import org.eclipse.ui.help.WorkbenchHelp;
import org.eclipse.ui.texteditor.AbstractTextEditor;
import org.eclipse.ui.texteditor.WorkbenchChainedTextFontFieldEditor;
import org.eclipse.jdt.ui.text.IJavaColorConstants;
import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration;
import org.eclipse.jdt.ui.text.JavaTextTools;
import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jdt.internal.ui.JavaUIMessages;
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider;
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor;
import org.eclipse.jdt.internal.ui.text.ContentAssistPreference;
import org.eclipse.jdt.internal.ui.util.TabFolderLayout;
/*
* The page for setting the editor options.
*/
public class JavaEditorPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
private static final String BOLD= "_bold";
public final OverlayPreferenceStore.OverlayKey[] fKeys= new OverlayPreferenceStore.OverlayKey[] {
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT),
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, JavaSourceViewerConfiguration.PREFERENCE_TAB_WIDTH),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVA_MULTI_LINE_COMMENT),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVA_MULTI_LINE_COMMENT + BOLD),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT + BOLD),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVA_KEYWORD),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVA_KEYWORD + BOLD),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVA_STRING),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVA_STRING + BOLD),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVA_DEFAULT),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVA_DEFAULT + BOLD),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVADOC_KEYWORD),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVADOC_KEYWORD + BOLD),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVADOC_TAG),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVADOC_TAG + BOLD),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVADOC_LINK),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVADOC_LINK + BOLD),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, IJavaColorConstants.JAVADOC_DEFAULT),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IJavaColorConstants.JAVADOC_DEFAULT + BOLD),
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, CompilationUnitEditor.MATCHING_BRACKETS_COLOR),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CompilationUnitEditor.MATCHING_BRACKETS),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, CompilationUnitEditor.CURRENT_LINE_COLOR),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CompilationUnitEditor.CURRENT_LINE),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, CompilationUnitEditor.PRINT_MARGIN_COLOR),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, CompilationUnitEditor.PRINT_MARGIN_COLUMN),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CompilationUnitEditor.PRINT_MARGIN),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, AbstractTextEditor.PREFERENCE_COLOR_FIND_SCOPE),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, CompilationUnitEditor.PROBLEM_INDICATION_COLOR),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CompilationUnitEditor.PROBLEM_INDICATION),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CompilationUnitDocumentProvider.HANDLE_TEMPRARY_PROBELMS),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CompilationUnitEditor.OVERVIEW_RULER),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CompilationUnitEditor.SPACES_FOR_TABS),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.AUTOACTIVATION),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, ContentAssistPreference.AUTOACTIVATION_DELAY),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.AUTOINSERT),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PROPOSALS_BACKGROUND),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PROPOSALS_FOREGROUND),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PARAMETERS_BACKGROUND),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.PARAMETERS_FOREGROUND),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVA),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVADOC),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.SHOW_VISIBLE_PROPOSALS),
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.ORDER_PROPOSALS),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.CASE_SENSITIVITY),
new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, ContentAssistPreference.ADD_IMPORT)
};
private final String[][] fListModel= new String[][] {
{ JavaUIMessages.getString("JavaEditorPreferencePage.multiLineComment"), IJavaColorConstants.JAVA_MULTI_LINE_COMMENT },
{ JavaUIMessages.getString("JavaEditorPreferencePage.singleLineComment"), IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT },
{ JavaUIMessages.getString("JavaEditorPreferencePage.keywords"), IJavaColorConstants.JAVA_KEYWORD },
{ JavaUIMessages.getString("JavaEditorPreferencePage.strings"), IJavaColorConstants.JAVA_STRING },
{ JavaUIMessages.getString("JavaEditorPreferencePage.others"), IJavaColorConstants.JAVA_DEFAULT },
{ JavaUIMessages.getString("JavaEditorPreferencePage.javaDocKeywords"), IJavaColorConstants.JAVADOC_KEYWORD },
{ JavaUIMessages.getString("JavaEditorPreferencePage.javaDocHtmlTags"), IJavaColorConstants.JAVADOC_TAG },
{ JavaUIMessages.getString("JavaEditorPreferencePage.javaDocLinks"), IJavaColorConstants.JAVADOC_LINK },
{ JavaUIMessages.getString("JavaEditorPreferencePage.javaDocOthers"), IJavaColorConstants.JAVADOC_DEFAULT }
};
private OverlayPreferenceStore fOverlayStore;
private JavaTextTools fJavaTextTools;
private Map fColorButtons= new HashMap();
private SelectionListener fColorButtonListener= new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
ColorEditor editor= (ColorEditor) e.widget.getData();
PreferenceConverter.setValue(fOverlayStore, (String) fColorButtons.get(editor), editor.getColorValue());
}
};
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
private Map fCheckBoxes= new HashMap();
private SelectionListener fCheckBoxListener= new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
Button button= (Button) e.widget;
fOverlayStore.setValue((String) fCheckBoxes.get(button), button.getSelection());
}
};
private Map fTextFields= new HashMap();
private ModifyListener fTextFieldListener= new ModifyListener() {
public void modifyText(ModifyEvent e) {
Text text= (Text) e.widget;
fOverlayStore.setValue((String) fTextFields.get(text), text.getText());
}
};
private WorkbenchChainedTextFontFieldEditor fFontEditor;
private List fList;
private ColorEditor fForegroundColorEditor;
private ColorEditor fBackgroundColorEditor;
private Button fBackgroundDefaultRadioButton;
private Button fBackgroundCustomRadioButton;
private Button fBackgroundColorButton;
private Button fBoldCheckBox;
private SourceViewer fPreviewViewer;
public JavaEditorPreferencePage() {
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
setDescription(JavaUIMessages.getString("JavaEditorPreferencePage.description"));
setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore());
fOverlayStore= new OverlayPreferenceStore(getPreferenceStore(), fKeys);
}
public static void initDefaults(IPreferenceStore store) {
Color color;
Display display= Display.getDefault();
store.setDefault(CompilationUnitEditor.MATCHING_BRACKETS, true);
color= display.getSystemColor(SWT.COLOR_GRAY);
PreferenceConverter.setDefault(store, CompilationUnitEditor.MATCHING_BRACKETS_COLOR, color.getRGB());
store.setDefault(CompilationUnitEditor.CURRENT_LINE, true);
PreferenceConverter.setDefault(store, CompilationUnitEditor.CURRENT_LINE_COLOR, new RGB(225, 235, 224));
store.setDefault(CompilationUnitEditor.PRINT_MARGIN, false);
store.setDefault(CompilationUnitEditor.PRINT_MARGIN_COLUMN, 80);
PreferenceConverter.setDefault(store, CompilationUnitEditor.PRINT_MARGIN_COLOR, new RGB(176, 180 , 185));
PreferenceConverter.setDefault(store, AbstractTextEditor.PREFERENCE_COLOR_FIND_SCOPE, new RGB(185, 176 , 180));
store.setDefault(CompilationUnitEditor.PROBLEM_INDICATION, true);
PreferenceConverter.setDefault(store, CompilationUnitEditor.PROBLEM_INDICATION_COLOR, new RGB(255, 0 , 128));
store.setDefault(CompilationUnitDocumentProvider.HANDLE_TEMPRARY_PROBELMS, true);
store.setDefault(CompilationUnitEditor.OVERVIEW_RULER, true);
WorkbenchChainedTextFontFieldEditor.startPropagate(store, JFaceResources.TEXT_FONT);
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
color= display.getSystemColor(SWT.COLOR_LIST_FOREGROUND);
PreferenceConverter.setDefault(store, AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND, color.getRGB());
store.setDefault(AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT, true);
color= display.getSystemColor(SWT.COLOR_LIST_BACKGROUND);
PreferenceConverter.setDefault(store, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND, color.getRGB());
store.setDefault(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, true);
store.setDefault(JavaSourceViewerConfiguration.PREFERENCE_TAB_WIDTH, 4);
store.setDefault(CompilationUnitEditor.SPACES_FOR_TABS, false);
PreferenceConverter.setDefault(store, IJavaColorConstants.JAVA_MULTI_LINE_COMMENT, new RGB(63, 127, 95));
store.setDefault(IJavaColorConstants.JAVA_MULTI_LINE_COMMENT + BOLD, false);
PreferenceConverter.setDefault(store, IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT, new RGB(63, 127, 95));
store.setDefault(IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT + BOLD, false);
PreferenceConverter.setDefault(store, IJavaColorConstants.JAVA_KEYWORD, new RGB(127, 0, 85));
store.setDefault(IJavaColorConstants.JAVA_KEYWORD + BOLD, true);
PreferenceConverter.setDefault(store, IJavaColorConstants.JAVA_STRING, new RGB(42, 0, 255));
store.setDefault(IJavaColorConstants.JAVA_STRING + BOLD, false);
PreferenceConverter.setDefault(store, IJavaColorConstants.JAVA_DEFAULT, new RGB(0, 0, 0));
store.setDefault(IJavaColorConstants.JAVA_DEFAULT + BOLD, false);
PreferenceConverter.setDefault(store, IJavaColorConstants.JAVADOC_KEYWORD, new RGB(127, 159, 191));
store.setDefault(IJavaColorConstants.JAVADOC_KEYWORD + BOLD, true);
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
PreferenceConverter.setDefault(store, IJavaColorConstants.JAVADOC_TAG, new RGB(127, 127, 159));
store.setDefault(IJavaColorConstants.JAVADOC_TAG + BOLD, false);
PreferenceConverter.setDefault(store, IJavaColorConstants.JAVADOC_LINK, new RGB(63, 63, 191));
store.setDefault(IJavaColorConstants.JAVADOC_LINK + BOLD, false);
PreferenceConverter.setDefault(store, IJavaColorConstants.JAVADOC_DEFAULT, new RGB(63, 95, 191));
store.setDefault(IJavaColorConstants.JAVADOC_DEFAULT + BOLD, false);
store.setDefault(ContentAssistPreference.AUTOACTIVATION, true);
store.setDefault(ContentAssistPreference.AUTOACTIVATION_DELAY, 500);
store.setDefault(ContentAssistPreference.AUTOINSERT, true);
PreferenceConverter.setDefault(store, ContentAssistPreference.PROPOSALS_BACKGROUND, new RGB(254, 241, 233));
PreferenceConverter.setDefault(store, ContentAssistPreference.PROPOSALS_FOREGROUND, new RGB(0, 0, 0));
PreferenceConverter.setDefault(store, ContentAssistPreference.PARAMETERS_BACKGROUND, new RGB(254, 241, 233));
PreferenceConverter.setDefault(store, ContentAssistPreference.PARAMETERS_FOREGROUND, new RGB(0, 0, 0));
store.setDefault(ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVA, ".");
store.setDefault(ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVADOC, "@");
store.setDefault(ContentAssistPreference.SHOW_VISIBLE_PROPOSALS, true);
store.setDefault(ContentAssistPreference.CASE_SENSITIVITY, false);
store.setDefault(ContentAssistPreference.ORDER_PROPOSALS, false);
store.setDefault(ContentAssistPreference.ADD_IMPORT, true);
}
/*
* @see IWorkbenchPreferencePage#init()
*/
public void init(IWorkbench workbench) {
}
/*
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
* @see PreferencePage#createControl(Composite)
*/
public void createControl(Composite parent) {
super.createControl(parent);
WorkbenchHelp.setHelp(getControl(), IJavaHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE);
}
private void handleListSelection() {
int i= fList.getSelectionIndex();
String key= fListModel[i][1];
RGB rgb= PreferenceConverter.getColor(fOverlayStore, key);
fForegroundColorEditor.setColorValue(rgb);
fBoldCheckBox.setSelection(fOverlayStore.getBoolean(key + BOLD));
}
private Control createColorPage(Composite parent) {
Composite colorComposite= new Composite(parent, SWT.NULL);
colorComposite.setLayout(new GridLayout());
Composite backgroundComposite= new Composite(colorComposite, SWT.NULL);
GridLayout layout= new GridLayout();
layout.marginHeight= 0;
layout.marginWidth= 0;
layout.numColumns= 2;
backgroundComposite.setLayout(layout);
Label label= new Label(backgroundComposite, SWT.NULL);
label.setText(JavaUIMessages.getString("JavaEditorPreferencePage.backgroundColor"));
GridData gd= new GridData();
gd.horizontalSpan= 2;
label.setLayoutData(gd);
SelectionListener backgroundSelectionListener= new SelectionListener() {
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
public void widgetSelected(SelectionEvent e) {
boolean custom= fBackgroundCustomRadioButton.getSelection();
fBackgroundColorButton.setEnabled(custom);
fOverlayStore.setValue(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, !custom);
}
public void widgetDefaultSelected(SelectionEvent e) {}
};
fBackgroundDefaultRadioButton= new Button(backgroundComposite, SWT.RADIO | SWT.LEFT);
fBackgroundDefaultRadioButton.setText(JavaUIMessages.getString("JavaEditorPreferencePage.systemDefault"));
gd= new GridData();
gd.horizontalSpan= 2;
fBackgroundDefaultRadioButton.setLayoutData(gd);
fBackgroundDefaultRadioButton.addSelectionListener(backgroundSelectionListener);
fBackgroundCustomRadioButton= new Button(backgroundComposite, SWT.RADIO | SWT.LEFT);
fBackgroundCustomRadioButton.setText(JavaUIMessages.getString("JavaEditorPreferencePage.custom"));
fBackgroundCustomRadioButton.addSelectionListener(backgroundSelectionListener);
fBackgroundColorEditor= new ColorEditor(backgroundComposite);
fBackgroundColorButton= fBackgroundColorEditor.getButton();
gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalAlignment= GridData.BEGINNING;
fBackgroundColorButton.setLayoutData(gd);
label= new Label(colorComposite, SWT.LEFT);
label.setText(JavaUIMessages.getString("JavaEditorPreferencePage.foreground"));
label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Composite editorComposite= new Composite(colorComposite, SWT.NULL);
layout= new GridLayout();
layout.numColumns= 2;
layout.marginHeight= 0;
layout.marginWidth= 0;
editorComposite.setLayout(layout);
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
gd= new GridData(GridData.FILL_BOTH);
editorComposite.setLayoutData(gd);
fList= new List(editorComposite, SWT.SINGLE | SWT.V_SCROLL);
gd= new GridData(GridData.FILL_BOTH);
gd.heightHint= convertHeightInCharsToPixels(5);
fList.setLayoutData(gd);
Composite stylesComposite= new Composite(editorComposite, SWT.NULL);
layout= new GridLayout();
layout.marginHeight= 0;
layout.marginWidth= 0;
layout.numColumns= 2;
stylesComposite.setLayout(layout);
stylesComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
label= new Label(stylesComposite, SWT.LEFT);
label.setText(JavaUIMessages.getString("JavaEditorPreferencePage.color"));
gd= new GridData();
gd.horizontalAlignment= GridData.BEGINNING;
label.setLayoutData(gd);
fForegroundColorEditor= new ColorEditor(stylesComposite);
Button foregroundColorButton= fForegroundColorEditor.getButton();
gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalAlignment= GridData.BEGINNING;
foregroundColorButton.setLayoutData(gd);
label= new Label(stylesComposite, SWT.LEFT);
label.setText(JavaUIMessages.getString("JavaEditorPreferencePage.bold"));
gd= new GridData();
gd.horizontalAlignment= GridData.BEGINNING;
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
label.setLayoutData(gd);
fBoldCheckBox= new Button(stylesComposite, SWT.CHECK);
gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalAlignment= GridData.BEGINNING;
fBoldCheckBox.setLayoutData(gd);
label= new Label(colorComposite, SWT.LEFT);
label.setText(JavaUIMessages.getString("JavaEditorPreferencePage.preview"));
label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Control previewer= createPreviewer(colorComposite);
gd= new GridData(GridData.FILL_BOTH);
gd.widthHint= convertWidthInCharsToPixels(80);
gd.heightHint= convertHeightInCharsToPixels(15);
previewer.setLayoutData(gd);
fList.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
handleListSelection();
}
});
foregroundColorButton.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
public void widgetSelected(SelectionEvent e) {
int i= fList.getSelectionIndex();
String key= fListModel[i][1];
PreferenceConverter.setValue(fOverlayStore, key, fForegroundColorEditor.getColorValue());
}
});
fBackgroundColorButton.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
PreferenceConverter.setValue(fOverlayStore, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND, fBackgroundColorEditor.getColorValue());
}
});
fBoldCheckBox.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
int i= fList.getSelectionIndex();
String key= fListModel[i][1];
fOverlayStore.setValue(key + BOLD, fBoldCheckBox.getSelection());
}
});
return colorComposite;
}
private Control createPreviewer(Composite parent) {
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
fJavaTextTools= new JavaTextTools(fOverlayStore);
fPreviewViewer= new SourceViewer(parent, null, SWT.V_SCROLL | SWT.H_SCROLL);
fPreviewViewer.configure(new JavaSourceViewerConfiguration(fJavaTextTools, null));
fPreviewViewer.getTextWidget().setFont(JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT));
fPreviewViewer.setEditable(false);
initializeViewerColors(fPreviewViewer);
String content= loadPreviewContentFromFile("ColorSettingPreviewCode.txt");
IDocument document= new Document(content);
IDocumentPartitioner partitioner= fJavaTextTools.createDocumentPartitioner();
partitioner.connect(document);
document.setDocumentPartitioner(partitioner);
fPreviewViewer.setDocument(document);
fOverlayStore.addPropertyChangeListener(new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
String p= event.getProperty();
if (p.equals(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND) ||
p.equals(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT))
{
initializeViewerColors(fPreviewViewer);
}
fPreviewViewer.invalidateTextPresentation();
}
});
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
return fPreviewViewer.getControl();
}
private Color fBackgroundColor;
/**
* Initializes the given viewer's colors.
*
* @param viewer the viewer to be initialized
*/
private void initializeViewerColors(ISourceViewer viewer) {
IPreferenceStore store= fOverlayStore;
if (store != null) {
StyledText styledText= viewer.getTextWidget();
Color color= store.getBoolean(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT)
? null
: createColor(store, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND, styledText.getDisplay());
styledText.setBackground(color);
if (fBackgroundColor != null)
fBackgroundColor.dispose();
fBackgroundColor= color;
}
}
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
/**
* Creates a color from the information stored in the given preference store.
* Returns <code>null</code> if there is no such information available.
*/
private Color createColor(IPreferenceStore store, String key, Display display) {
RGB rgb= null;
if (store.contains(key)) {
if (store.isDefault(key))
rgb= PreferenceConverter.getDefaultColor(store, key);
else
rgb= PreferenceConverter.getColor(store, key);
if (rgb != null)
return new Color(display, rgb);
}
return null;
}
private static void setEnabled(Control control, boolean enable) {
control.setEnabled(enable);
if (control instanceof Composite) {
Composite composite= (Composite) control;
Control[] children= composite.getChildren();
for (int i= 0; i < children.length; i++)
setEnabled(children[i], enable);
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
}
}
private Button fBracketHighlightButton;
private Control fBracketHighlightColor;
private Button fLineHighlightButton;
private Control fLineHighlightColor;
private Button fPrintMarginButton;
private Control fPrintMarginColor;
private Control fPrintMarginColumn;
private Button fProblemIndicationButton;
private Control fProblemIndicationColor;
private Control fFindScopeColor;
private Control createBehaviorPage(Composite parent) {
Composite behaviorComposite= new Composite(parent, SWT.NULL);
GridLayout layout= new GridLayout(); layout.numColumns= 2;
behaviorComposite.setLayout(layout);
String label= JavaUIMessages.getString("JavaEditorPreferencePage.textFont");
addTextFontEditor(behaviorComposite, label, AbstractTextEditor.PREFERENCE_FONT);
label= JavaUIMessages.getString("JavaEditorPreferencePage.displayedTabWidth");
addTextField(behaviorComposite, label, JavaSourceViewerConfiguration.PREFERENCE_TAB_WIDTH, 2, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.insertSpaceForTabs");
addCheckBox(behaviorComposite, label, CompilationUnitEditor.SPACES_FOR_TABS, 0);
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
label= JavaUIMessages.getString("JavaEditorPreferencePage.showProblemsBeforeCompiling");
addCheckBox(behaviorComposite, label, CompilationUnitDocumentProvider.HANDLE_TEMPRARY_PROBELMS, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.showOverviewRuler");
addCheckBox(behaviorComposite, label, CompilationUnitEditor.OVERVIEW_RULER, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.highlightMatchingBrackets");
fBracketHighlightButton= addCheckBox(behaviorComposite, label, CompilationUnitEditor.MATCHING_BRACKETS, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.matchingBracketsHighlightColor");
fBracketHighlightColor= addColorButton(behaviorComposite, label, CompilationUnitEditor.MATCHING_BRACKETS_COLOR, 0);
fBracketHighlightButton.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
setEnabled(fBracketHighlightColor, fBracketHighlightButton.getSelection());
}
public void widgetDefaultSelected(SelectionEvent e) {
}
});
label= JavaUIMessages.getString("JavaEditorPreferencePage.highlightCurrentLine");
fLineHighlightButton= addCheckBox(behaviorComposite, label, CompilationUnitEditor.CURRENT_LINE, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.currentLineHighlightColor");
fLineHighlightColor= addColorButton(behaviorComposite, label, CompilationUnitEditor.CURRENT_LINE_COLOR, 0);
fLineHighlightButton.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
setEnabled(fLineHighlightColor, fLineHighlightButton.getSelection());
}
public void widgetDefaultSelected(SelectionEvent e) {
}
});
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
label= JavaUIMessages.getString("JavaEditorPreferencePage.highlightProblems");
fProblemIndicationButton= addCheckBox(behaviorComposite, label, CompilationUnitEditor.PROBLEM_INDICATION, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.problemHighlightColor");
fProblemIndicationColor= addColorButton(behaviorComposite, label, CompilationUnitEditor.PROBLEM_INDICATION_COLOR, 0);
fProblemIndicationButton.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
setEnabled(fProblemIndicationColor, fProblemIndicationButton.getSelection());
}
public void widgetDefaultSelected(SelectionEvent e) {
}
});
label= JavaUIMessages.getString("JavaEditorPreferencePage.showPrintMargin");
fPrintMarginButton= addCheckBox(behaviorComposite, label, CompilationUnitEditor.PRINT_MARGIN, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.printMarginColor");
fPrintMarginColor= addColorButton(behaviorComposite, label, CompilationUnitEditor.PRINT_MARGIN_COLOR, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.printMarginColumn");
fPrintMarginColumn= addTextField(behaviorComposite, label, CompilationUnitEditor.PRINT_MARGIN_COLUMN, 4, 0);
fPrintMarginButton.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
boolean enabled= fPrintMarginButton.getSelection();
setEnabled(fPrintMarginColor, enabled);
setEnabled(fPrintMarginColumn, enabled);
}
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
public void widgetDefaultSelected(SelectionEvent e) {
}
});
label= JavaUIMessages.getString("JavaEditorPreferencePage.findScope");
fFindScopeColor= addColorButton(behaviorComposite, label, AbstractTextEditor.PREFERENCE_COLOR_FIND_SCOPE, 0);
return behaviorComposite;
}
private Control createContentAssistPage(Composite parent) {
Composite contentAssistComposite= new Composite(parent, SWT.NULL);
GridLayout layout= new GridLayout(); layout.numColumns= 2;
contentAssistComposite.setLayout(layout);
String label= JavaUIMessages.getString("JavaEditorPreferencePage.insertSingleProposalsAutomatically");
addCheckBox(contentAssistComposite, label, ContentAssistPreference.AUTOINSERT, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.showOnlyProposalsVisibleInTheInvocationContext");
addCheckBox(contentAssistComposite, label, ContentAssistPreference.SHOW_VISIBLE_PROPOSALS, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.presentProposalsInAlphabeticalOrder");
addCheckBox(contentAssistComposite, label, ContentAssistPreference.ORDER_PROPOSALS, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.enableAutoActivation");
addCheckBox(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.automaticallyAddImportInsteadOfQualifiedName");
addCheckBox(contentAssistComposite, label, ContentAssistPreference.ADD_IMPORT, 0);
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
label= JavaUIMessages.getString("JavaEditorPreferencePage.autoActivationDelay");
addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_DELAY, 4, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.autoActivationTriggersForJava");
addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVA, 25, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.autoActivationTriggersForJavaDoc");
addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVADOC, 25, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.backgroundForCompletionProposals");
addColorButton(contentAssistComposite, label, ContentAssistPreference.PROPOSALS_BACKGROUND, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.foregroundForCompletionProposals");
addColorButton(contentAssistComposite, label, ContentAssistPreference.PROPOSALS_FOREGROUND, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.backgroundForMethodParameters");
addColorButton(contentAssistComposite, label, ContentAssistPreference.PARAMETERS_BACKGROUND, 0);
label= JavaUIMessages.getString("JavaEditorPreferencePage.foregroundForMethodParameters");
addColorButton(contentAssistComposite, label, ContentAssistPreference.PARAMETERS_FOREGROUND, 0);
return contentAssistComposite;
}
/*
* @see PreferencePage#createContents(Composite)
*/
protected Control createContents(Composite parent) {
fOverlayStore.load();
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
fOverlayStore.start();
TabFolder folder= new TabFolder(parent, SWT.NONE);
folder.setLayout(new TabFolderLayout());
folder.setLayoutData(new GridData(GridData.FILL_BOTH));
TabItem item= new TabItem(folder, SWT.NONE);
item.setText(JavaUIMessages.getString("JavaEditorPreferencePage.general"));
item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE));
item.setControl(createBehaviorPage(folder));
item= new TabItem(folder, SWT.NONE);
item.setText(JavaUIMessages.getString("JavaEditorPreferencePage.colors"));
item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE));
item.setControl(createColorPage(folder));
item= new TabItem(folder, SWT.NONE);
item.setText(JavaUIMessages.getString("JavaEditorPreferencePage.codeAssist"));
item.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_CFILE));
item.setControl(createContentAssistPage(folder));
initialize();
return folder;
}
private void initialize() {
fFontEditor.setPreferenceStore(getPreferenceStore());
fFontEditor.setPreferencePage(this);
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
fFontEditor.load();
initializeFields();
for (int i= 0; i < fListModel.length; i++)
fList.add(fListModel[i][0]);
fList.getDisplay().asyncExec(new Runnable() {
public void run() {
fList.select(0);
handleListSelection();
}
});
}
private void initializeFields() {
Iterator e= fColorButtons.keySet().iterator();
while (e.hasNext()) {
ColorEditor c= (ColorEditor) e.next();
String key= (String) fColorButtons.get(c);
RGB rgb= PreferenceConverter.getColor(fOverlayStore, key);
c.setColorValue(rgb);
}
e= fCheckBoxes.keySet().iterator();
while (e.hasNext()) {
Button b= (Button) e.next();
String key= (String) fCheckBoxes.get(b);
b.setSelection(fOverlayStore.getBoolean(key));
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
}
e= fTextFields.keySet().iterator();
while (e.hasNext()) {
Text t= (Text) e.next();
String key= (String) fTextFields.get(t);
t.setText(fOverlayStore.getString(key));
}
RGB rgb= PreferenceConverter.getColor(fOverlayStore, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND);
fBackgroundColorEditor.setColorValue(rgb);
boolean default_= fOverlayStore.getBoolean(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT);
fBackgroundDefaultRadioButton.setSelection(default_);
fBackgroundCustomRadioButton.setSelection(!default_);
fBackgroundColorButton.setEnabled(!default_);
setEnabled(fBracketHighlightColor, fBracketHighlightButton.getSelection());
setEnabled(fLineHighlightColor, fLineHighlightButton.getSelection());
}
/*
* @see PreferencePage#performOk()
*/
public boolean performOk() {
fFontEditor.store();
fOverlayStore.propagate();
return true;
}
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
/*
* @see PreferencePage#performDefaults()
*/
protected void performDefaults() {
fFontEditor.loadDefault();
fOverlayStore.loadDefaults();
initializeFields();
handleListSelection();
super.performDefaults();
fPreviewViewer.invalidateTextPresentation();
}
/*
* @see DialogPage#dispose()
*/
public void dispose() {
if (fJavaTextTools != null) {
fJavaTextTools= null;
}
fFontEditor.setPreferencePage(null);
fFontEditor.setPreferenceStore(null);
if (fOverlayStore != null) {
fOverlayStore.stop();
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
fOverlayStore= null;
}
super.dispose();
}
private Control addColorButton(Composite parent, String label, String key, int indentation) {
Composite composite= new Composite(parent, SWT.NONE);
GridData gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan= 2;
composite.setLayoutData(gd);
GridLayout layout= new GridLayout();
layout.numColumns= 2;
layout.marginWidth= 0;
layout.marginHeight= 0;
composite.setLayout(layout);
Label labelControl= new Label(composite, SWT.NONE);
labelControl.setText(label);
gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalIndent= indentation;
labelControl.setLayoutData(gd);
ColorEditor editor= new ColorEditor(composite);
Button button= editor.getButton();
button.setData(editor);
gd= new GridData();
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
gd.horizontalAlignment= GridData.END;
button.setLayoutData(gd);
button.addSelectionListener(fColorButtonListener);
fColorButtons.put(editor, key);
return composite;
}
private Button addCheckBox(Composite parent, String label, String key, int indentation) {
Button checkBox= new Button(parent, SWT.CHECK);
checkBox.setText(label);
GridData gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalIndent= indentation;
gd.horizontalSpan= 2;
checkBox.setLayoutData(gd);
checkBox.addSelectionListener(fCheckBoxListener);
fCheckBoxes.put(checkBox, key);
return checkBox;
}
private Control addTextField(Composite parent, String label, String key, int textLimit, int indentation) {
Composite composite= new Composite(parent, SWT.NONE);
GridData gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan= 2;
composite.setLayoutData(gd);
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
GridLayout layout= new GridLayout();
layout.numColumns= 2;
layout.marginWidth= 0;
layout.marginHeight= 0;
composite.setLayout(layout);
Label labelControl= new Label(composite, SWT.NONE);
labelControl.setText(label);
gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalIndent= indentation;
labelControl.setLayoutData(gd);
Text textControl= new Text(composite, SWT.BORDER | SWT.SINGLE);
gd= new GridData(GridData.FILL_HORIZONTAL);
gd.widthHint= convertWidthInCharsToPixels(textLimit + 1);
gd.horizontalAlignment= GridData.END;
textControl.setLayoutData(gd);
textControl.setTextLimit(textLimit);
textControl.addModifyListener(fTextFieldListener);
fTextFields.put(textControl, key);
return composite;
}
private void addTextFontEditor(Composite parent, String label, String key) {
Composite editorComposite= new Composite(parent, SWT.NULL);
GridLayout layout= new GridLayout();
layout.numColumns= 3;
editorComposite.setLayout(layout);
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
|
fFontEditor= new WorkbenchChainedTextFontFieldEditor(key, label, editorComposite);
fFontEditor.setChangeButtonText(JavaUIMessages.getString("JavaEditorPreferencePage.change"));
GridData gd= new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan= 2;
editorComposite.setLayoutData(gd);
}
private String loadPreviewContentFromFile(String filename) {
String line;
String separator= System.getProperty("line.separator");
StringBuffer buffer= new StringBuffer(512);
BufferedReader reader= null;
try {
reader= new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(filename)));
while ((line= reader.readLine()) != null) {
buffer.append(line);
buffer.append(separator);
}
} catch (IOException io) {
JavaPlugin.log(io);
} finally {
if (reader != null) {
try { reader.close(); } catch (IOException e) {}
}
}
return buffer.toString();
}
}
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
|
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.jdt.internal.ui.text.link;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.custom.VerifyKeyListener;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.events.VerifyEvent;
import org.eclipse.swt.events.VerifyListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.BadPositionCategoryException;
import org.eclipse.jface.text.DefaultPositionUpdater;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IPositionUpdater;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextInputListener;
import org.eclipse.jface.text.ITextViewer;
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
|
import org.eclipse.jface.text.ITextViewerExtension;
import org.eclipse.jface.text.Position;
import org.eclipse.jface.text.Region;
import org.eclipse.jface.util.Assert;
import org.eclipse.jdt.internal.ui.JavaPlugin;
/**
* A user interface for <code>LinkedPositionManager</code>, using <code>ITextViewer</code>.
*/
public class LinkedPositionUI implements LinkedPositionListener,
ITextInputListener, ModifyListener, VerifyListener, VerifyKeyListener, PaintListener {
/**
* A listener for notification when the user cancelled the edit operation.
*/
public interface ExitListener {
void exit(boolean accept);
}
private static final int UNINSTALL= 1;
private static final int COMMIT= 2;
private static final int DOCUMENT_CHANGED= 4;
private static final int UPDATE_CARET= 8;
private static final String CARET_POSITION= "LinkedPositionUI.caret.position";
private static final IPositionUpdater fgUpdater= new DefaultPositionUpdater(CARET_POSITION);
private final ITextViewer fViewer;
private final LinkedPositionManager fManager;
private final Color fFrameColor;
private int fFinalCaretOffset= -1;
private Position fFramePosition;
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
|
private int fCaretOffset;
private ExitListener fExitListener;
/**
* Creates a user interface for <code>LinkedPositionManager</code>.
*
* @param viewer the text viewer.
* @param manager the <code>LinkedPositionManager</code> managing a <code>IDocument</code> of the <code>ITextViewer</code>.
*/
public LinkedPositionUI(ITextViewer viewer, LinkedPositionManager manager) {
Assert.isNotNull(viewer);
Assert.isNotNull(manager);
fViewer= viewer;
fManager= manager;
fManager.setLinkedPositionListener(this);
fFrameColor= viewer.getTextWidget().getDisplay().getSystemColor(SWT.COLOR_RED);
}
/**
* Sets the final position of the caret when the linked mode is exited
* successfully by leaving the last linked position using TAB.
*/
public void setFinalCaretOffset(int offset) {
fFinalCaretOffset= offset;
}
/**
* Sets a <code>CancelListener</code> which is notified if the linked mode
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
|
* is exited unsuccessfully by hitting ESC.
*/
public void setCancelListener(ExitListener listener) {
fExitListener= listener;
}
/*
* @see LinkedPositionManager.LinkedPositionListener#setCurrentPositions(Position, int)
*/
public void setCurrentPosition(Position position, int caretOffset) {
if (!fFramePosition.equals(position)) {
redrawRegion();
fFramePosition= position;
}
fCaretOffset= caretOffset;
}
/**
* Enters the linked mode. The linked mode can be left by calling
* <code>exit</code>.
*
* @see exit(boolean)
*/
public void enter() {
IDocument document= fViewer.getDocument();
document.addPositionCategory(CARET_POSITION);
document.addPositionUpdater(fgUpdater);
try {
if (fFinalCaretOffset != -1)
document.addPosition(CARET_POSITION, new Position(fFinalCaretOffset));
} catch (BadLocationException e) {
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
|
openErrorDialog(fViewer.getTextWidget().getShell(), e);
} catch (BadPositionCategoryException e) {
JavaPlugin.log(e);
Assert.isTrue(false);
}
fViewer.addTextInputListener(this);
ITextViewerExtension extension= (ITextViewerExtension) fViewer;
extension.prependVerifyKeyListener(this);
StyledText text= fViewer.getTextWidget();
text.addVerifyListener(this);
text.addModifyListener(this);
text.addPaintListener(this);
text.showSelection();
fFramePosition= fManager.getFirstPosition();
if (fFramePosition == null)
leave(UNINSTALL | COMMIT | UPDATE_CARET);
}
/**
* @see LinkedPositionManager.LinkedPositionListener#exit(boolean)
*/
public void exit(boolean success) {
leave((success ? COMMIT : 0) | UPDATE_CARET);
}
/**
* Returns the cursor selection, after having entered the linked mode.
* <code>enter()</code> must be called prior to a call to this method.
*/
public IRegion getSelectedRegion() {
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
|
if (fFramePosition == null)
return new Region(fFinalCaretOffset, 0);
else
return new Region(fFramePosition.getOffset(), fFramePosition.getLength());
}
private void leave(int flags) {
if ((flags & UNINSTALL) != 0)
fManager.uninstall((flags & COMMIT) != 0);
StyledText text= fViewer.getTextWidget();
text.removePaintListener(this);
text.removeModifyListener(this);
text.removeVerifyListener(this);
ITextViewerExtension extension= (ITextViewerExtension) fViewer;
extension.removeVerifyKeyListener(this);
fViewer.removeTextInputListener(this);
try {
IRegion region= fViewer.getVisibleRegion();
IDocument document= fViewer.getDocument();
if (((flags & COMMIT) != 0) &&
((flags & DOCUMENT_CHANGED) == 0) &&
((flags & UPDATE_CARET) != 0))
{
Position[] positions= document.getPositions(CARET_POSITION);
if ((positions != null) && (positions.length != 0)) {
int offset= positions[0].getOffset() - region.getOffset();
if ((offset >= 0) && (offset <= region.getLength()))
text.setSelection(offset, offset);
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
|
}
}
document.removePositionUpdater(fgUpdater);
document.removePositionCategory(CARET_POSITION);
if (fExitListener != null)
fExitListener.exit(
((flags & COMMIT) != 0) ||
((flags & DOCUMENT_CHANGED) != 0));
} catch (BadPositionCategoryException e) {
JavaPlugin.log(e);
Assert.isTrue(false);
}
if ((flags & DOCUMENT_CHANGED) == 0)
text.redraw();
}
private void next() {
redrawRegion();
fFramePosition= fManager.getNextPosition(fFramePosition.getOffset());
if (fFramePosition == null) {
leave(UNINSTALL | COMMIT | UPDATE_CARET);
} else {
selectRegion();
redrawRegion();
}
}
private void previous() {
redrawRegion();
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
|
Position position= fManager.getPreviousPosition(fFramePosition.getOffset());
if (position == null) {
fViewer.getTextWidget().getDisplay().beep();
} else {
fFramePosition= position;
selectRegion();
redrawRegion();
}
}
/*
* @see VerifyKeyListener#verifyKey(VerifyEvent)
*/
public void verifyKey(VerifyEvent event) {
switch (event.character) {
case 0x09:
{
Point selection= fViewer.getTextWidget().getSelection();
IRegion region= fViewer.getVisibleRegion();
int offset= selection.x + region.getOffset();
int length= selection.y - selection.x;
if (!LinkedPositionManager.includes(fFramePosition, offset, length)) {
leave(UNINSTALL | COMMIT | UPDATE_CARET);
return;
}
}
|
13,507 |
Bug 13507 LinkedPositionUI has a reference to SWT.COLOR_RED
|
LinkedPositionUI(ITextViewer, LinkedPositionManager) - org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI has a reference to SWT.COLOR_RED which will be unreadble if the user sets their background colour to Red. We will be adding a getErrorText colour to JFaceColours in build >20020411. You may want to use that.
|
resolved fixed
|
0ceae1a
|
JDT
|
https://github.com/eclipse-jdt/eclipse.jdt.ui
|
eclipse-jdt/eclipse.jdt.ui
|
java
| null | null | null | 2002-04-17T12:28:28Z | 2002-04-11T13:00:00Z |
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
|
if (event.stateMask == SWT.SHIFT)
previous();
else
next();
event.doit= false;
break;
case 0x0D:
leave(UNINSTALL | COMMIT | UPDATE_CARET);
event.doit= false;
break;
case 0x1B:
leave(UNINSTALL | COMMIT);
event.doit= false;
break;
}
}
/*
* @see VerifyListener#verifyText(VerifyEvent)
*/
public void verifyText(VerifyEvent event) {
if (!event.doit)
return;
IRegion region= fViewer.getVisibleRegion();
int offset= event.start + region.getOffset();
int length= event.end - event.start;
if (!fManager.anyPositionIncludes(offset, length))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.