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
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20: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.ArrayList; import java.util.HashMap; 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;
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
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.core.runtime.IStatus; 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; 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;
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
import org.eclipse.jdt.internal.ui.JavaUIMessages; import org.eclipse.jdt.internal.ui.dialogs.StatusInfo; import org.eclipse.jdt.internal.ui.dialogs.StatusUtil; 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), 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),
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
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), 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.LINKED_POSITION_COLOR),
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
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), 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 },
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
{ 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()); } }; 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()); } };
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
private Map fTextFields= new HashMap(); private ArrayList fNumberFields= new ArrayList(); private ModifyListener fTextFieldListener= new ModifyListener() { public void modifyText(ModifyEvent e) { if (!e.widget.isDisposed()) textChanged((Text) e.widget); } }; 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; 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 fLinkedPositionColor;
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
public JavaEditorPreferencePage() { 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); PreferenceConverter.setDefault(store, CompilationUnitEditor.LINKED_POSITION_COLOR, new RGB(0, 200 , 100));
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
store.setDefault(CompilationUnitEditor.OVERVIEW_RULER, true); WorkbenchChainedTextFontFieldEditor.startPropagate(store, JFaceResources.TEXT_FONT); 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);
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
PreferenceConverter.setDefault(store, IJavaColorConstants.JAVADOC_KEYWORD, new RGB(127, 159, 191)); store.setDefault(IJavaColorConstants.JAVADOC_KEYWORD + BOLD, true); 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() */
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
public void init(IWorkbench workbench) { } /* * @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();
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
gd.horizontalSpan= 2; label.setLayoutData(gd); SelectionListener backgroundSelectionListener= new SelectionListener() { 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;
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
layout.marginHeight= 0; layout.marginWidth= 0; editorComposite.setLayout(layout); 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);
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
label.setText(JavaUIMessages.getString("JavaEditorPreferencePage.bold")); gd= new GridData(); gd.horizontalAlignment= GridData.BEGINNING; 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() {
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
public void widgetDefaultSelected(SelectionEvent e) { } 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;
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
} private Control createPreviewer(Composite parent) { 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); }
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
fPreviewViewer.invalidateTextPresentation(); } }); 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();
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
fBackgroundColor= color; } } /** * 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;
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
Control[] children= composite.getChildren(); for (int i= 0; i < children.length; i++) setEnabled(children[i], enable); } } 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, true); label= JavaUIMessages.getString("JavaEditorPreferencePage.insertSpaceForTabs"); addCheckBox(behaviorComposite, label, CompilationUnitEditor.SPACES_FOR_TABS, 0); 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() {
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
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) { } }); 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());
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
} 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, true); fPrintMarginButton.addSelectionListener(new SelectionListener() { public void widgetSelected(SelectionEvent e) { boolean enabled= fPrintMarginButton.getSelection(); setEnabled(fPrintMarginColor, enabled); setEnabled(fPrintMarginColumn, enabled); } public void widgetDefaultSelected(SelectionEvent e) { } }); label= JavaUIMessages.getString("JavaEditorPreferencePage.findScopeColor"); fFindScopeColor= addColorButton(behaviorComposite, label, AbstractTextEditor.PREFERENCE_COLOR_FIND_SCOPE, 0); label= JavaUIMessages.getString("JavaEditorPreferencePage.linkedPositionColor"); fLinkedPositionColor= addColorButton(behaviorComposite, label, CompilationUnitEditor.LINKED_POSITION_COLOR, 0);
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
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); label= JavaUIMessages.getString("JavaEditorPreferencePage.autoActivationDelay"); addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_DELAY, 4, 0, true); label= JavaUIMessages.getString("JavaEditorPreferencePage.autoActivationTriggersForJava"); addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVA, 25, 0, false); label= JavaUIMessages.getString("JavaEditorPreferencePage.autoActivationTriggersForJavaDoc");
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
addTextField(contentAssistComposite, label, ContentAssistPreference.AUTOACTIVATION_TRIGGERS_JAVADOC, 25, 0, false); 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(); 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"));
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
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); fFontEditor.load(); initializeFields(); for (int i= 0; i < fListModel.length; i++) fList.add(fListModel[i][0]); fList.getDisplay().asyncExec(new Runnable() {
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
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)); } e= fTextFields.keySet().iterator(); while (e.hasNext()) { Text t= (Text) e.next(); String key= (String) fTextFields.get(t); t.setText(fOverlayStore.getString(key)); }
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
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; } /* * @see PreferencePage#performDefaults() */ protected void performDefaults() { fFontEditor.loadDefault(); fOverlayStore.loadDefaults();
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
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(); fOverlayStore= null; } super.dispose(); } private Control addColorButton(Composite parent, String label, String key, int indentation) { Composite composite= new Composite(parent, SWT.NONE);
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
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(); gd.horizontalAlignment= GridData.END; button.setLayoutData(gd); button.addSelectionListener(fColorButtonListener); fColorButtons.put(editor, key); return composite; }
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
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, boolean isNumber) { 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);
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
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); if (isNumber) fNumberFields.add(textControl); 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); 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);
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
} 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(); } private void textChanged(Text textControl) { String number= textControl.getText(); IStatus status= validatePositiveNumber(number); if (!status.matches(IStatus.ERROR)) fOverlayStore.setValue((String) fTextFields.get(textControl), number); updateStatus(status); }
12,683
Bug 12683 Invalid Thread Access self hosting using Java Search
The Java Search causes an Invalid Thread Access when you are self hosting. This will also occur if you use search in a JUnit test or if I run Eclipse using the following options: eclipse -ws win32 -debug -dev bin The problem is a call to Display.getCurrent() in the initialization code for the JavaEditorPreferencePage which is called the first time you do a search. STEPS 1) Self host Eclipse 2) Select Java Search 3) Enter the name of a class 4) Hit Search - Invalid Thread Access Log: Wed Apr 03 08:57:31 EST 2002 4 org.eclipse.jdt.ui 1 Internal Error java.lang.reflect.InvocationTargetException: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:1887) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.checkDevice(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.getSystemColor(Display.java:965) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage.initDefaults (JavaEditorPreferencePage.java:209) at org.eclipse.jdt.internal.ui.JavaPlugin.initializeDefaultPreferences (JavaPlugin.java:320) at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore (AbstractUIPlugin.java(Compiled Code)) at org.eclipse.jdt.internal.ui.preferences.AppearancePreferencePage.showMethodRetur nType(AppearancePreferencePage.java:40) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.initMasks (StandardJavaUILabelProvider.java:43) at org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider.<init> (StandardJavaUILabelProvider.java:29) at org.eclipse.jdt.internal.ui.search.JavaSearchResultLabelProvider.<init> (JavaSearchResultLabelProvider.java:39) at org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.aboutToStart (JavaSearchResultCollector.java:104) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:376) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:84) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:64) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1343) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:78) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:98)
resolved fixed
3775393
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-03T13:51:48Z
2002-04-03T13:20:00Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
private IStatus validatePositiveNumber(String number) { StatusInfo status= new StatusInfo(); if (number.length() == 0) { status.setError(JavaUIMessages.getString("JavaEditorPreferencePage.empty_input")); } else { try { int value= Integer.parseInt(number); if (value < 0) status.setError(JavaUIMessages.getFormattedString("JavaEditorPreferencePage.invalid_input", number)); } catch (NumberFormatException e) { status.setError(JavaUIMessages.getFormattedString("JavaEditorPreferencePage.invalid_input", number)); } } return status; } private void updateStatus(IStatus status) { if (!status.matches(IStatus.ERROR)) { for (int i= 0; i < fNumberFields.size(); i++) { Text text= (Text) fNumberFields.get(i); IStatus s= validatePositiveNumber(text.getText()); status= StatusUtil.getMoreSevere(s, status); } } setValid(!status.matches(IStatus.ERROR)); StatusUtil.applyToStatusLine(this, status); } }
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/JdtMoveAction.java
package org.eclipse.jdt.internal.ui.reorg; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set;
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/JdtMoveAction.java
import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.ui.IWorkbenchSite; import org.eclipse.ui.actions.MoveProjectAction; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.ui.JavaElementContentProvider; import org.eclipse.jdt.internal.corext.refactoring.base.RefactoringStatus; import org.eclipse.jdt.internal.corext.refactoring.reorg.MoveRefactoring; import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgRefactoring; import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgUtils; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.dialogs.ElementTreeSelectionDialog; import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings; import org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard; import org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog; import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringErrorDialogUtil; import org.eclipse.jdt.internal.ui.util.ExceptionHandler; public class JdtMoveAction extends ReorgDestinationAction {
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/JdtMoveAction.java
private boolean fShowPreview= false; public JdtMoveAction(IWorkbenchSite site) { super(site); setText(ReorgMessages.getString("moveAction.label")); } public boolean canOperateOn(IStructuredSelection selection) { if (ClipboardActionUtil.hasOnlyProjects(selection)) return selection.size() == 1; else return super.canOperateOn(selection); } protected void run(IStructuredSelection selection) { if (ClipboardActionUtil.hasOnlyProjects(selection)){ moveProject(selection); } else { super.run(selection); } } /* non java-doc * see @ReorgDestinationAction#isOkToProceed */ String getActionName() { return ReorgMessages.getString("moveAction.name"); } /* non java-doc
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/JdtMoveAction.java
* see @ReorgDestinationAction#getDestinationDialogMessage */ String getDestinationDialogMessage() { return ReorgMessages.getString("moveAction.destination.label"); } /* non java-doc * see @ReorgDestinationAction#createRefactoring */ ReorgRefactoring createRefactoring(List elements){ return new MoveRefactoring(elements, JavaPreferencesSettings.getCodeGenerationSettings()); } ElementTreeSelectionDialog createDestinationSelectionDialog(Shell parent, ILabelProvider labelProvider, JavaElementContentProvider cp, ReorgRefactoring refactoring){ return new MoveDestinationDialog(parent, labelProvider, cp, (MoveRefactoring)refactoring); } /* non java-doc * see @ReorgDestinationAction#isOkToProceed */ protected boolean isOkToProceed(ReorgRefactoring refactoring) throws JavaModelException{ return (isOkToMoveReadOnly(refactoring)); } /* * @see ReorgDestinationAction#getExcluded(ReorgRefactoring) */ Set getExcluded(ReorgRefactoring refactoring) throws JavaModelException{ Set elements= refactoring.getElementsThatExistInTarget(); Set result= new HashSet();
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/JdtMoveAction.java
for (Iterator iter= elements.iterator(); iter.hasNext(); ){ Object o= iter.next(); int action= askIfOverwrite(ReorgUtils.getName(o)); if (action == IDialogConstants.CANCEL_ID) return null; if (action == IDialogConstants.YES_TO_ALL_ID) return new HashSet(0); if (action == IDialogConstants.NO_ID) result.add(o); } return result; } private static int askIfOverwrite(String elementName){ Shell shell= JavaPlugin.getActiveWorkbenchShell().getShell(); String title= ReorgMessages.getString("JdtMoveAction.move"); String question= ReorgMessages.getFormattedString("JdtMoveAction.overwrite", elementName); String[] labels= new String[] {IDialogConstants.YES_LABEL, IDialogConstants.YES_TO_ALL_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }; final MessageDialog dialog = new MessageDialog(shell, title, null, question, MessageDialog.QUESTION, labels, 0); shell.getDisplay().syncExec(new Runnable() { public void run() { dialog.open(); } }); int result = dialog.getReturnCode(); if (result == 0) return IDialogConstants.YES_ID; if (result == 1)
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/JdtMoveAction.java
return IDialogConstants.YES_TO_ALL_ID; if (result == 2) return IDialogConstants.NO_ID; return IDialogConstants.CANCEL_ID; } protected void setShowPreview(boolean showPreview) { fShowPreview = showPreview; } private static boolean isOkToMoveReadOnly(ReorgRefactoring refactoring){ if (! hasReadOnlyElements(refactoring)) return true; return MessageDialog.openQuestion( JavaPlugin.getActiveWorkbenchShell(), ReorgMessages.getString("moveAction.checkMove"), ReorgMessages.getString("moveAction.error.readOnly")); } private static boolean hasReadOnlyElements(ReorgRefactoring refactoring){ for (Iterator iter= refactoring.getElementsToReorg().iterator(); iter.hasNext(); ){ if (ReorgUtils.shouldConfirmReadOnly(iter.next())) return true; } return false; } /* non java-doc
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/JdtMoveAction.java
* @see ReorgDestinationAction#doReorg(ReorgRefactoring) */ void doReorg(ReorgRefactoring refactoring) throws JavaModelException{ if (!fShowPreview){ RefactoringStatus status= refactoring.checkPreconditions(new NullProgressMonitor()); if (status.hasFatalError()) RefactoringErrorDialogUtil.open(ReorgMessages.getString("JdtMoveAction.move"), status); else super.doReorg(refactoring); return; } RefactoringWizard wizard= new RefactoringWizard(refactoring, ReorgMessages.getString("JdtMoveAction.move"), IJavaHelpContextIds.MOVE_CU_ERROR_WIZARD_PAGE); new RefactoringWizardDialog(JavaPlugin.getActiveWorkbenchShell(), wizard).open(); } private void moveProject(IStructuredSelection selection){ MoveProjectAction action= new MoveProjectAction(JavaPlugin.getActiveWorkbenchShell()); action.selectionChanged(selection); action.run(); } private class MoveDestinationDialog extends ElementTreeSelectionDialog { private static final int PREVIEW_ID= IDialogConstants.CLIENT_ID + 1; private MoveRefactoring fRefactoring; private Button fCheckbox; private Button fPreview;
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/JdtMoveAction.java
MoveDestinationDialog(Shell parent, ILabelProvider labelProvider, ITreeContentProvider contentProvider, MoveRefactoring refactoring){ super(parent, labelProvider, contentProvider); fRefactoring= refactoring; fShowPreview= false; setDoubleClickSelects(false); } protected Control createDialogArea(Composite parent) { Composite result= (Composite)super.createDialogArea(parent); fCheckbox= new Button(result, SWT.CHECK); fCheckbox.setText(ReorgMessages.getString("JdtMoveAction.update_references")); fCheckbox.setEnabled(canUpdateReferences()); fCheckbox.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { updatePreviewButton(); fRefactoring.setUpdateReferences(fCheckbox.getEnabled() && fCheckbox.getSelection()); } }); fCheckbox.setSelection(canUpdateReferences()); return result; } protected void createButtonsForButtonBar(Composite parent) { super.createButtonsForButtonBar(parent); fPreview= createButton(parent, PREVIEW_ID, ReorgMessages.getString("JdtMoveAction.preview"), false); } protected void updateOKStatus() { super.updateOKStatus();
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/JdtMoveAction.java
try{ fRefactoring.setDestination(getFirstResult()); fCheckbox.setEnabled(getOkButton().getEnabled() && canUpdateReferences()); updatePreviewButton(); } catch (JavaModelException e){ ExceptionHandler.handle(e, ReorgMessages.getString("JdtMoveAction.move"), ReorgMessages.getString("JdtMoveAction.exception")); } } protected void buttonPressed(int buttonId) { fShowPreview= (buttonId == PREVIEW_ID); super.buttonPressed(buttonId); if (buttonId == PREVIEW_ID) close(); } private void updatePreviewButton(){ fPreview.setEnabled(fCheckbox.getEnabled() && fCheckbox.getSelection()); } private boolean canUpdateReferences(){ try{ return fRefactoring.canUpdateReferences(); } catch (JavaModelException e){ return false; } } } }
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/ReorgDestinationAction.java
package org.eclipse.jdt.internal.ui.reorg; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.MultiStatus; import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.dialogs.ErrorDialog; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.dialogs.ProgressMonitorDialog;
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/ReorgDestinationAction.java
import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.Viewer; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IFileEditorInput; import org.eclipse.ui.IWorkbenchSite; import org.eclipse.ui.dialogs.ListSelectionDialog; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.ui.JavaElementContentProvider; import org.eclipse.jdt.ui.JavaElementLabelProvider; import org.eclipse.jdt.ui.JavaElementSorter; import org.eclipse.jdt.ui.actions.SelectionDispatchAction; import org.eclipse.jdt.internal.corext.refactoring.Assert; import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgRefactoring; import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgUtils; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.dialogs.ElementTreeSelectionDialog; import org.eclipse.jdt.internal.ui.dialogs.ISelectionValidator; import org.eclipse.jdt.internal.ui.dialogs.StatusInfo; import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility; import org.eclipse.jdt.internal.ui.packageview.PackageFilter; import org.eclipse.jdt.internal.ui.util.ExceptionHandler; import org.eclipse.jdt.internal.ui.viewsupport.ListContentProvider; public abstract class ReorgDestinationAction extends SelectionDispatchAction {
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/ReorgDestinationAction.java
protected ReorgDestinationAction(IWorkbenchSite site) { super(site); } protected void selectionChanged(IStructuredSelection selection) { setEnabled(canOperateOn(selection)); } protected boolean canOperateOn(IStructuredSelection selection) { return ClipboardActionUtil.canActivate(createRefactoring(selection.toList())); } protected void run(IStructuredSelection selection) { List elements= selection.toList(); if (!ensureSaved(elements, getActionName())) return; ReorgRefactoring refactoring= createRefactoring(elements); setUnsavedFileList(refactoring, elements); Object destination= selectDestination(refactoring);
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/ReorgDestinationAction.java
if (destination == null) return; try{ String duplicate= getDuplicatedElementName(elements); if (duplicate != null){ String message= ReorgMessages.getFormattedString("ReorgDestinationAction.duplicate", duplicate); MessageDialog.openInformation(JavaPlugin.getActiveWorkbenchShell().getShell(), ReorgMessages.getString("ReorgDestinationAction.duplicate_name"), message); return; } refactoring.setDestination(destination); Set excluded= getExcluded(refactoring); if (excluded == null) return; if (excluded.size() == elements.size()) return; refactoring.setExcludedElements(excluded); if (! isOkToProceed(refactoring)) return; doReorg(refactoring); } catch (JavaModelException e){ ExceptionHandler.handle(e, ReorgMessages.getString("ReorgDestinationAction.exception_title"), ReorgMessages.getString("ReorgDestinationAction.exception")); } } /** * returns null if no 2 elements have the same name */
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/ReorgDestinationAction.java
private static String getDuplicatedElementName(List elements){ String[] names= getElementNames(elements); if (names.length == 0) return null; Arrays.sort(names); String last= names[0]; for (int i= 1; i < names.length; i++){ if (last.equals(names[i])) return last; last= names[i]; } return null; } abstract String getActionName(); abstract String getDestinationDialogMessage(); abstract ReorgRefactoring createRefactoring(List elements); Set getExcluded(ReorgRefactoring refactoring) throws JavaModelException{ return new HashSet(0); } protected boolean isOkToProceed(ReorgRefactoring refactoring) throws JavaModelException{ return true; } void doReorg(ReorgRefactoring refactoring) throws JavaModelException{
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/ReorgDestinationAction.java
MultiStatus status= ClipboardActionUtil.perform(refactoring); if (status.isOK()) return; JavaPlugin.log(status); ErrorDialog.openError(JavaPlugin.getActiveWorkbenchShell(), getActionName(), ReorgMessages.getString("ReorgDestinationAction.error"), status); } private static boolean ensureSaved(List elements, String actionName) { List unsavedEditors= new ArrayList(); List unsavedElements= new ArrayList(); collectUnsavedEditors(elements, unsavedEditors, unsavedElements); if (unsavedEditors.isEmpty()) return true; ListSelectionDialog dialog = createUnsavedEditorDialog(unsavedElements); if (dialog.open() != dialog.OK) return false; IEditorPart[] unsavedEditorArray= (IEditorPart[]) unsavedEditors.toArray(new IEditorPart[unsavedEditors.size()]); IRunnableWithProgress r= createSaveEditorOperation(dialog.getResult(), unsavedEditorArray); try { new ProgressMonitorDialog(JavaPlugin.getActiveWorkbenchShell()).run(false, false, r); } catch (InvocationTargetException e) { ExceptionHandler.handle(e, actionName, ReorgMessages.getString("ReorgAction.exception.saving")); return false; } catch (InterruptedException e) { } return true;
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/ReorgDestinationAction.java
} private static void setUnsavedFileList(ReorgRefactoring refactoring, List elements){ List unsavedEditors= new ArrayList(0); collectUnsavedEditors(elements, unsavedEditors, new ArrayList(0)); refactoring.setUnsavedFiles(getFiles(unsavedEditors)); } private static IFile[] getFiles(List editorParts){ List result= new ArrayList(editorParts.size()); for (Iterator iter= editorParts.iterator(); iter.hasNext(); ){ IEditorPart each= (IEditorPart)iter.next(); IEditorInput input= each.getEditorInput(); if (input instanceof IFileEditorInput) result.add(((IFileEditorInput)input).getFile()); } return (IFile[]) result.toArray(new IFile[result.size()]); } private static IRunnableWithProgress createSaveEditorOperation(final Object[] elementsToSave, final IEditorPart[] unsavedEditors) { return new IRunnableWithProgress() { public void run(IProgressMonitor pm) { pm.beginTask(ReorgMessages.getString("ReorgAction.task.saving"), elementsToSave.length); for (int i= 0; i < elementsToSave.length; i++) { IEditorPart editor= findEditor(elementsToSave[i], unsavedEditors); if (editor != null) editor.doSave(new SubProgressMonitor(pm, 1)); else pm.worked(1); } pm.done(); }
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/ReorgDestinationAction.java
}; } private static IEditorPart findEditor(Object element, IEditorPart[] unsavedEditors){ for (int i= 0; i < unsavedEditors.length; i++) { if (EditorUtility.isEditorInput(element, unsavedEditors[i])) return unsavedEditors[i]; } return null; } private static ListSelectionDialog createUnsavedEditorDialog(List unsavedElements) { int labelFlags= JavaElementLabelProvider.SHOW_DEFAULT | JavaElementLabelProvider.SHOW_POST_QUALIFIED; Shell parent= JavaPlugin.getActiveWorkbenchShell(); String msg= ReorgMessages.getString("ReorgAction.checkSaveTargets"); ListSelectionDialog dialog= new ListSelectionDialog(parent, unsavedElements, new ListContentProvider(), new JavaElementLabelProvider(labelFlags), msg); dialog.setInitialSelections(unsavedElements.toArray()); return dialog; } private static void collectUnsavedEditors(List elements, List unsavedEditors, List unsavedElements) { IEditorPart[] editors= JavaPlugin.getDirtyEditors(); for (int i= 0; i < editors.length; i++) { for (Iterator iter= elements.iterator(); iter.hasNext(); ){ Object element= iter.next(); if (EditorUtility.isEditorInput(element, editors[i])) { unsavedEditors.add(editors[i]); unsavedElements.add(element); } }
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/ReorgDestinationAction.java
} } private static String[] getElementNames(List elements){ String[] result= new String[elements.size()]; int i= 0; for (Iterator iter= elements.iterator(); iter.hasNext(); ){ result[i]= ReorgUtils.getName(iter.next()); i++; } return result; } protected Object selectDestination(ReorgRefactoring refactoring) { JavaElementContentProvider cp= new JavaElementContentProvider() { public boolean hasChildren(Object element) { return !(element instanceof IPackageFragment) && super.hasChildren(element); } }; ElementTreeSelectionDialog dialog= createDestinationSelectionDialog(JavaPlugin.getActiveWorkbenchShell(), new DestinationRenderer(JavaElementLabelProvider.SHOW_SMALL_ICONS ), cp, refactoring); dialog.setTitle(getActionName()); dialog.setValidator(new ReorgSelectionValidator(refactoring)); dialog.addFilter(new ContainerFilter(refactoring)); dialog.setSorter(new JavaElementSorter()); dialog.setMessage(getDestinationDialogMessage());
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/ReorgDestinationAction.java
dialog.setSize(60, 18); dialog.setInput(JavaCore.create(ResourcesPlugin.getWorkspace().getRoot())); dialog.setInitialSelection(computeCommonParent(refactoring.getElementsToReorg())); if (dialog.open() != dialog.CANCEL) return dialog.getFirstResult(); return null; } ElementTreeSelectionDialog createDestinationSelectionDialog(Shell parent, ILabelProvider labelProvider, JavaElementContentProvider cp, ReorgRefactoring refactoring){ return new ElementTreeSelectionDialog(parent, labelProvider, cp); } private static Object computeCommonParent(List elements){ if (elements.isEmpty()) return null; Object parent= elements.get(0); for (Iterator iter= elements.iterator(); iter.hasNext(); ){ parent= computeCommonParent(parent, iter.next()); } IResource parentRes= getResource(parent); IJavaElement parentElement= JavaCore.create(parentRes); if (parentElement != null) return parentElement; return getResource(parent); } private static Object computeCommonParent(Object e1, Object e2){ IResource r1= getResource(e1); IResource r2= getResource(e2);
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/ReorgDestinationAction.java
if (r1 == null && r2 == null) return null; if (r1 == null) return r2.getParent(); if (r2 == null) return r1.getParent(); if (r1.equals(r2)) return r1.getParent(); if (r1.getFullPath().isPrefixOf(r2.getFullPath())) return r1; if (r2.getFullPath().isPrefixOf(r1.getFullPath())) return r2; IPath p1= r1.getParent().getFullPath(); IPath p2= r2.getParent().getFullPath(); IPath commonPath= new Path(""); int segCount= Math.min(p1.segmentCount(), p2.segmentCount()); for (int i= 0; i < segCount; i++){ if (p1.segment(i).equals(p2.segment(i))) commonPath= commonPath.append(p1.segment(i)); else break; } return ResourcesPlugin.getWorkspace().getRoot().findMember(commonPath); } private static IResource getResource(Object o) { try{
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/ReorgDestinationAction.java
if (o instanceof IResource) return (IResource)o; else if (o instanceof IJavaElement) return ((IJavaElement)o).getCorrespondingResource(); else return null; } catch (JavaModelException e){ JavaPlugin.log(e); return null; } } private static class ContainerFilter extends PackageFilter { private ReorgRefactoring fRefactoring; ContainerFilter(ReorgRefactoring refactoring) { Assert.isNotNull(refactoring); fRefactoring= refactoring; } public boolean select(Viewer viewer, Object parent, Object o) { if (fRefactoring.getElementsToReorg().contains(o)) return false; return fRefactoring.canBeAncestor(o); } } private static class DestinationRenderer extends JavaElementLabelProvider {
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/ReorgDestinationAction.java
public DestinationRenderer(int flags) { super(flags); } public String getText(Object element) { try { if (element instanceof IPackageFragmentRoot) { IPackageFragmentRoot root= (IPackageFragmentRoot)element; if (root.getUnderlyingResource() instanceof IProject) return ReorgMessages.getString("DestinationRenderer.packages"); } } catch (JavaModelException e) { ExceptionHandler.handle(e, ReorgMessages.getString("ReorgDestinationAction.exception_title"), ReorgMessages.getString("ReorgDestinationAction.exception")); } return super.getText(element); } } private static class ReorgSelectionValidator implements ISelectionValidator {
3,926
Bug 3926 issue copying file with duplicate name (1GF60YK)
I tried to copy a package.html file from one package to another using the "copy" menu entry in the packages view. The destination package already had a file called package.html so I was presented with a "Duplicate names" dialog. The dialog has two radio buttons, one for "replace element" and one for "rename to". Issues: - The replace button is grayed out - "Rename to" is ambiguous. Am I renaming the thing being copied or the file already at the destination. Since I actually wanted to overwrite the file and the rename renames the file being copied, I could not accomplish the task. Note that the copy action from the navigator works as desired. NOTES: KH (6/12/2001 7:11:31 AM) Moving to JUI for comment.
resolved fixed
5577ddb
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T09:16:33Z
2001-10-11T03:13:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/ReorgDestinationAction.java
private ReorgRefactoring fRefactoring; public ReorgSelectionValidator(ReorgRefactoring refactoring) { Assert.isNotNull(refactoring); fRefactoring= refactoring; } public IStatus validate(Object[] selection) { if (selection.length != 1) return new StatusInfo(IStatus.ERROR, ""); try{ if (fRefactoring.isValidDestination(selection[0])) return new StatusInfo(); return new StatusInfo(IStatus.ERROR, ""); } catch (JavaModelException e){ ExceptionHandler.handle(e, ReorgMessages.getString("ReorgDestinationAction.exception_title"), ReorgMessages.getString("ReorgDestinationAction.exception")); return new StatusInfo(IStatus.ERROR, ""); } } } }
15,188
Bug 15188 Persist "update references" refactoring preference
The "Move" refactoring dialog should persist the "Update references to the moved element(s)" preference. In addition, the default setting for the button should be ON. The common case for a refactoring is that the user wants us to update references.
resolved fixed
afba086
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T10:52:08Z
2002-05-03T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/JdtMoveAction.java
package org.eclipse.jdt.internal.ui.reorg; import java.util.Iterator; import java.util.List; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.ui.IWorkbenchSite;
15,188
Bug 15188 Persist "update references" refactoring preference
The "Move" refactoring dialog should persist the "Update references to the moved element(s)" preference. In addition, the default setting for the button should be ON. The common case for a refactoring is that the user wants us to update references.
resolved fixed
afba086
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T10:52:08Z
2002-05-03T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/JdtMoveAction.java
import org.eclipse.ui.actions.MoveProjectAction; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.ui.JavaElementContentProvider; import org.eclipse.jdt.internal.corext.refactoring.base.RefactoringStatus; import org.eclipse.jdt.internal.corext.refactoring.reorg.MoveRefactoring; import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgRefactoring; import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgUtils; import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.dialogs.ElementTreeSelectionDialog; import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings; import org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard; import org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog; import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringErrorDialogUtil; import org.eclipse.jdt.internal.ui.util.ExceptionHandler; public class JdtMoveAction extends ReorgDestinationAction { private boolean fShowPreview= false; public JdtMoveAction(IWorkbenchSite site) { super(site); setText(ReorgMessages.getString("moveAction.label")); } public boolean canOperateOn(IStructuredSelection selection) { if (ClipboardActionUtil.hasOnlyProjects(selection)) return selection.size() == 1; else return super.canOperateOn(selection); } protected void run(IStructuredSelection selection) { if (ClipboardActionUtil.hasOnlyProjects(selection)){
15,188
Bug 15188 Persist "update references" refactoring preference
The "Move" refactoring dialog should persist the "Update references to the moved element(s)" preference. In addition, the default setting for the button should be ON. The common case for a refactoring is that the user wants us to update references.
resolved fixed
afba086
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T10:52:08Z
2002-05-03T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/JdtMoveAction.java
moveProject(selection); } else { super.run(selection); } } /* non java-doc * see @ReorgDestinationAction#isOkToProceed */ String getActionName() { return ReorgMessages.getString("moveAction.name"); } /* non java-doc * see @ReorgDestinationAction#getDestinationDialogMessage */ String getDestinationDialogMessage() { return ReorgMessages.getString("moveAction.destination.label"); } /* non java-doc * see @ReorgDestinationAction#createRefactoring */ ReorgRefactoring createRefactoring(List elements){ return new MoveRefactoring(elements, JavaPreferencesSettings.getCodeGenerationSettings()); } ElementTreeSelectionDialog createDestinationSelectionDialog(Shell parent, ILabelProvider labelProvider, JavaElementContentProvider cp, ReorgRefactoring refactoring){ return new MoveDestinationDialog(parent, labelProvider, cp, (MoveRefactoring)refactoring); }
15,188
Bug 15188 Persist "update references" refactoring preference
The "Move" refactoring dialog should persist the "Update references to the moved element(s)" preference. In addition, the default setting for the button should be ON. The common case for a refactoring is that the user wants us to update references.
resolved fixed
afba086
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T10:52:08Z
2002-05-03T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/JdtMoveAction.java
/* non java-doc * see @ReorgDestinationAction#isOkToProceed */ protected boolean isOkToProceed(ReorgRefactoring refactoring) throws JavaModelException{ return (isOkToMoveReadOnly(refactoring)); } protected void setShowPreview(boolean showPreview) { fShowPreview = showPreview; } private static boolean isOkToMoveReadOnly(ReorgRefactoring refactoring){ if (! hasReadOnlyElements(refactoring)) return true; return MessageDialog.openQuestion( JavaPlugin.getActiveWorkbenchShell(), ReorgMessages.getString("moveAction.checkMove"), ReorgMessages.getString("moveAction.error.readOnly")); } private static boolean hasReadOnlyElements(ReorgRefactoring refactoring){ for (Iterator iter= refactoring.getElementsToReorg().iterator(); iter.hasNext(); ){ if (ReorgUtils.shouldConfirmReadOnly(iter.next())) return true; } return false; } /* non java-doc
15,188
Bug 15188 Persist "update references" refactoring preference
The "Move" refactoring dialog should persist the "Update references to the moved element(s)" preference. In addition, the default setting for the button should be ON. The common case for a refactoring is that the user wants us to update references.
resolved fixed
afba086
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T10:52:08Z
2002-05-03T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/JdtMoveAction.java
* @see ReorgDestinationAction#doReorg(ReorgRefactoring) */ void doReorg(ReorgRefactoring refactoring) throws JavaModelException{ if (!fShowPreview){ RefactoringStatus status= refactoring.checkPreconditions(new NullProgressMonitor()); if (status.hasFatalError()) RefactoringErrorDialogUtil.open(ReorgMessages.getString("JdtMoveAction.move"), status); else super.doReorg(refactoring); return; } RefactoringWizard wizard= new RefactoringWizard(refactoring, ReorgMessages.getString("JdtMoveAction.move"), IJavaHelpContextIds.MOVE_CU_ERROR_WIZARD_PAGE); new RefactoringWizardDialog(JavaPlugin.getActiveWorkbenchShell(), wizard).open(); } private void moveProject(IStructuredSelection selection){ MoveProjectAction action= new MoveProjectAction(JavaPlugin.getActiveWorkbenchShell()); action.selectionChanged(selection); action.run(); } private class MoveDestinationDialog extends ElementTreeSelectionDialog { private static final int PREVIEW_ID= IDialogConstants.CLIENT_ID + 1; private MoveRefactoring fRefactoring; private Button fCheckbox; private Button fPreview;
15,188
Bug 15188 Persist "update references" refactoring preference
The "Move" refactoring dialog should persist the "Update references to the moved element(s)" preference. In addition, the default setting for the button should be ON. The common case for a refactoring is that the user wants us to update references.
resolved fixed
afba086
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T10:52:08Z
2002-05-03T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/JdtMoveAction.java
MoveDestinationDialog(Shell parent, ILabelProvider labelProvider, ITreeContentProvider contentProvider, MoveRefactoring refactoring){ super(parent, labelProvider, contentProvider); fRefactoring= refactoring; fShowPreview= false; setDoubleClickSelects(false); } protected Control createDialogArea(Composite parent) { Composite result= (Composite)super.createDialogArea(parent); fCheckbox= new Button(result, SWT.CHECK); fCheckbox.setText(ReorgMessages.getString("JdtMoveAction.update_references")); fCheckbox.setEnabled(canUpdateReferences()); fCheckbox.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { updatePreviewButton(); fRefactoring.setUpdateReferences(fCheckbox.getEnabled() && fCheckbox.getSelection()); } }); fCheckbox.setSelection(canUpdateReferences()); return result; } protected void createButtonsForButtonBar(Composite parent) { super.createButtonsForButtonBar(parent); fPreview= createButton(parent, PREVIEW_ID, ReorgMessages.getString("JdtMoveAction.preview"), false); } protected void updateOKStatus() { super.updateOKStatus();
15,188
Bug 15188 Persist "update references" refactoring preference
The "Move" refactoring dialog should persist the "Update references to the moved element(s)" preference. In addition, the default setting for the button should be ON. The common case for a refactoring is that the user wants us to update references.
resolved fixed
afba086
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T10:52:08Z
2002-05-03T15:33:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/reorg/JdtMoveAction.java
try{ fRefactoring.setDestination(getFirstResult()); fCheckbox.setEnabled(getOkButton().getEnabled() && canUpdateReferences()); updatePreviewButton(); } catch (JavaModelException e){ ExceptionHandler.handle(e, ReorgMessages.getString("JdtMoveAction.move"), ReorgMessages.getString("JdtMoveAction.exception")); } } protected void buttonPressed(int buttonId) { fShowPreview= (buttonId == PREVIEW_ID); super.buttonPressed(buttonId); if (buttonId == PREVIEW_ID) close(); } private void updatePreviewButton(){ fPreview.setEnabled(fCheckbox.getEnabled() && fCheckbox.getSelection()); } private boolean canUpdateReferences(){ try{ return fRefactoring.canUpdateReferences(); } catch (JavaModelException e){ return false; } } } }
9,228
Bug 9228 Surround with try-catch works only if the selected code throws a exception
As there are runtime exceptions, wich can be interesting to catch by clients, it would be nice to allow the surround feature on any code snippet. Standard exception could be Throwable.
resolved fixed
5eda0a9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T14:10:53Z
2002-02-07T13:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
package org.eclipse.jdt.internal.ui.text.correction; import java.util.ArrayList; import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.text.IDocument; import org.eclipse.jdt.core.IBuffer; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.Signature; import org.eclipse.jdt.core.dom.AST; import org.eclipse.jdt.core.dom.ASTNode; import org.eclipse.jdt.core.dom.Assignment; import org.eclipse.jdt.core.dom.BodyDeclaration; import org.eclipse.jdt.core.dom.CompilationUnit; import org.eclipse.jdt.core.dom.Expression; import org.eclipse.jdt.core.dom.ITypeBinding;
9,228
Bug 9228 Surround with try-catch works only if the selected code throws a exception
As there are runtime exceptions, wich can be interesting to catch by clients, it would be nice to allow the surround feature on any code snippet. Standard exception could be Throwable.
resolved fixed
5eda0a9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T14:10:53Z
2002-02-07T13:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
import org.eclipse.jdt.core.dom.MethodDeclaration; import org.eclipse.jdt.core.dom.ReturnStatement; import org.eclipse.jdt.core.dom.SimpleName; import org.eclipse.jdt.core.dom.Statement; import org.eclipse.jdt.core.dom.VariableDeclarationFragment; import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings; import org.eclipse.jdt.internal.corext.codemanipulation.ImportEdit; import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility; import org.eclipse.jdt.internal.corext.dom.GenericVisitor; import org.eclipse.jdt.internal.corext.refactoring.changes.CompilationUnitChange; import org.eclipse.jdt.internal.corext.refactoring.nls.NLSRefactoring; import org.eclipse.jdt.internal.corext.refactoring.surround.SurroundWithTryCatchRefactoring; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings; import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter; import org.eclipse.jdt.internal.ui.refactoring.nls.ExternalizeWizard; /** */ public class LocalCorrectionsSubProcessor { public static void addCastProposals(ProblemPosition problemPos, ArrayList proposals) throws CoreException { String[] args= problemPos.getArguments(); if (args.length == 2) { ICompilationUnit cu= problemPos.getCompilationUnit(); String castDestType= args[1]; CompilationUnit astRoot= AST.parseCompilationUnit(cu, false); ASTNode selectedNode= ASTResolving.findSelectedNode(astRoot, problemPos.getOffset(), problemPos.getLength()); int pos= problemPos.getOffset(); if (selectedNode != null) { int parentNodeType= selectedNode.getParent().getNodeType();
9,228
Bug 9228 Surround with try-catch works only if the selected code throws a exception
As there are runtime exceptions, wich can be interesting to catch by clients, it would be nice to allow the surround feature on any code snippet. Standard exception could be Throwable.
resolved fixed
5eda0a9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T14:10:53Z
2002-02-07T13:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
if (parentNodeType == ASTNode.ASSIGNMENT) { Assignment assign= (Assignment) selectedNode.getParent(); if (selectedNode.equals(assign.getLeftHandSide())) { pos= assign.getRightHandSide().getStartPosition(); } } else if (parentNodeType == ASTNode.VARIABLE_DECLARATION_FRAGMENT) { VariableDeclarationFragment frag= (VariableDeclarationFragment) selectedNode.getParent(); if (selectedNode.equals(frag.getName())) { pos= frag.getInitializer().getStartPosition(); } } } String cast= '(' + Signature.getSimpleName(castDestType) + ')'; String formatted= StubUtility.codeFormat(cast + 'x', 0, ""); if (formatted.charAt(formatted.length() - 1) == 'x') { cast= formatted.substring(0, formatted.length() - 1); } String label= CorrectionMessages.getFormattedString("LocalCorrectionsSubProcessor.addcast.description", args[1]); InsertCorrectionProposal proposal= new InsertCorrectionProposal(label, cu, pos, cast, 1); CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings(); ImportEdit edit= new ImportEdit(problemPos.getCompilationUnit(), settings); edit.addImport(castDestType); proposal.getCompilationUnitChange().addTextEdit("import", edit); proposals.add(proposal); } }
9,228
Bug 9228 Surround with try-catch works only if the selected code throws a exception
As there are runtime exceptions, wich can be interesting to catch by clients, it would be nice to allow the surround feature on any code snippet. Standard exception could be Throwable.
resolved fixed
5eda0a9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T14:10:53Z
2002-02-07T13:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
public static void addUncaughtExceptionProposals(ProblemPosition problemPos, ArrayList proposals) throws CoreException { ICompilationUnit cu= problemPos.getCompilationUnit(); CompilationUnit astRoot= AST.parseCompilationUnit(cu, true); ASTNode selectedNode= ASTResolving.findSelectedNode(astRoot, problemPos.getOffset(), problemPos.getLength()); if (selectedNode == null) { return; } while (selectedNode != null && !(selectedNode instanceof Statement)) { selectedNode= selectedNode.getParent(); } if (selectedNode != null) { CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings(); SurroundWithTryCatchRefactoring refactoring= new SurroundWithTryCatchRefactoring(cu, selectedNode.getStartPosition(), selectedNode.getLength(), settings); refactoring.setSaveChanges(false); if (refactoring.checkActivationBasics(astRoot, null).isOK()) { String label= CorrectionMessages.getString("LocalCorrectionsSubProcessor.surroundwith.description"); CUCorrectionProposal proposal= new CUCorrectionProposal(label, (CompilationUnitChange) refactoring.createChange(null), 0); proposals.add(proposal); } } BodyDeclaration decl= ASTResolving.findParentBodyDeclaration(selectedNode); if (decl instanceof MethodDeclaration) { String uncaughtName= problemPos.getArguments()[0]; MethodDeclaration methodDecl= (MethodDeclaration) decl; SimpleName name= methodDecl.getName(); int pos= name.getStartPosition() + name.getLength();
9,228
Bug 9228 Surround with try-catch works only if the selected code throws a exception
As there are runtime exceptions, wich can be interesting to catch by clients, it would be nice to allow the surround feature on any code snippet. Standard exception could be Throwable.
resolved fixed
5eda0a9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T14:10:53Z
2002-02-07T13:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
StringBuffer insertString= new StringBuffer(); if (methodDecl.thrownExceptions().isEmpty()) { insertString.append(" throws "); } else { insertString.append(", "); } insertString.append(Signature.getSimpleName(uncaughtName)); String label= CorrectionMessages.getString("LocalCorrectionsSubProcessor.addthrows.description"); InsertCorrectionProposal proposal= new InsertCorrectionProposal(label, cu, pos, insertString.toString(), 0); CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings(); ImportEdit edit= new ImportEdit(cu, settings); edit.addImport(uncaughtName); proposal.getCompilationUnitChange().addTextEdit("import", edit); proposals.add(proposal); } } public static void addMethodWithConstrNameProposals(ProblemPosition problemPos, ArrayList proposals) throws CoreException { ICompilationUnit cu= problemPos.getCompilationUnit(); CompilationUnit astRoot= AST.parseCompilationUnit(cu, false); ASTNode selectedNode= ASTResolving.findSelectedNode(astRoot, problemPos.getOffset(), problemPos.getLength()); if (selectedNode instanceof SimpleName && selectedNode.getParent() instanceof MethodDeclaration) { MethodDeclaration declaration= (MethodDeclaration) selectedNode.getParent(); int start= declaration.getReturnType().getStartPosition(); int end= declaration.getName().getStartPosition(); String label= CorrectionMessages.getString("LocalCorrectionsSubProcessor.constrnamemethod.description"); ReplaceCorrectionProposal proposal= new ReplaceCorrectionProposal(label, cu, start, end - start, "", 0); proposals.add(proposal);
9,228
Bug 9228 Surround with try-catch works only if the selected code throws a exception
As there are runtime exceptions, wich can be interesting to catch by clients, it would be nice to allow the surround feature on any code snippet. Standard exception could be Throwable.
resolved fixed
5eda0a9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T14:10:53Z
2002-02-07T13:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
} } public static void addUnusedVariableProposals(ProblemPosition problemPos, ArrayList proposals) throws CoreException { ICompilationUnit cu= problemPos.getCompilationUnit(); CompilationUnit astRoot= AST.parseCompilationUnit(cu, false); ASTNode selectedNode= ASTResolving.findSelectedNode(astRoot, problemPos.getOffset(), problemPos.getLength()); if (selectedNode instanceof SimpleName) { selectedNode= selectedNode.getParent(); } if (selectedNode instanceof VariableDeclarationFragment) { ASTNode parent= selectedNode.getParent(); int start= parent.getStartPosition(); int end= start + parent.getLength(); IBuffer buf= cu.getBuffer(); while (end < buf.getLength() && Character.isWhitespace(buf.getChar(end))) { end++; } String label= CorrectionMessages.getString("LocalCorrectionsSubProcessor.removelocalvar.description"); ReplaceCorrectionProposal proposal= new ReplaceCorrectionProposal(label, cu, start, end - start, "", 0); proposals.add(proposal); } } public static void addVoidMethodReturnsProposals(ProblemPosition problemPos, ArrayList proposals) throws CoreException { ICompilationUnit cu= problemPos.getCompilationUnit(); CompilationUnit astRoot= AST.parseCompilationUnit(cu, true); ASTNode selectedNode= ASTResolving.findSelectedNode(astRoot, problemPos.getOffset(), problemPos.getLength()); if (selectedNode != null) {
9,228
Bug 9228 Surround with try-catch works only if the selected code throws a exception
As there are runtime exceptions, wich can be interesting to catch by clients, it would be nice to allow the surround feature on any code snippet. Standard exception could be Throwable.
resolved fixed
5eda0a9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T14:10:53Z
2002-02-07T13:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
if (selectedNode.getParent() instanceof ReturnStatement) { ReturnStatement returnStatement= (ReturnStatement) selectedNode.getParent(); Expression expr= returnStatement.getExpression(); if (expr != null) { ITypeBinding binding= expr.resolveTypeBinding(); if (binding != null) { if ("null".equals(binding.getName())) { binding= selectedNode.getAST().resolveWellKnownType("java.lang.Object"); } BodyDeclaration decl= ASTResolving.findParentBodyDeclaration(returnStatement); if (decl instanceof MethodDeclaration) { ASTNode returnType= ((MethodDeclaration) decl).getReturnType(); String label= CorrectionMessages.getString("LocalCorrectionsSubProcessor.voidmethodreturns.description") + binding.getName(); ReplaceCorrectionProposal proposal= new ReplaceCorrectionProposal(label, cu, returnType.getStartPosition(), returnType.getLength(), binding.getName(), 0); proposals.add(proposal); } } } } } } public static void addMissingReturnTypeProposals(ProblemPosition problemPos, ArrayList proposals) throws CoreException { ICompilationUnit cu= problemPos.getCompilationUnit(); CompilationUnit astRoot= AST.parseCompilationUnit(cu, true); ASTNode selectedNode= ASTResolving.findSelectedNode(astRoot, problemPos.getOffset(), problemPos.getLength()); if (selectedNode != null) { BodyDeclaration decl= ASTResolving.findParentBodyDeclaration(selectedNode); if (decl instanceof MethodDeclaration) { final ITypeBinding[] res= new ITypeBinding[1];
9,228
Bug 9228 Surround with try-catch works only if the selected code throws a exception
As there are runtime exceptions, wich can be interesting to catch by clients, it would be nice to allow the surround feature on any code snippet. Standard exception could be Throwable.
resolved fixed
5eda0a9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T14:10:53Z
2002-02-07T13:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
res[0]= null; decl.accept(new GenericVisitor() { public boolean visit(ReturnStatement node) { if (res[0] == null) { Expression expr= node.getExpression(); if (expr != null) { ITypeBinding binding= expr.resolveTypeBinding(); if (binding != null) { res[0]= binding; } else { res[0]= node.getAST().resolveWellKnownType("java.lang.Object"); } } else { res[0]= node.getAST().resolveWellKnownType("void"); } } return false; } }); ITypeBinding type= res[0]; if (type == null) { type= decl.getAST().resolveWellKnownType("void"); } String str= type.getName() + " "; int pos= ((MethodDeclaration) decl).getName().getStartPosition(); String label= CorrectionMessages.getFormattedString("LocalCorrectionsSubProcessor.missingreturntype.description", type.getName()); InsertCorrectionProposal proposal= new InsertCorrectionProposal(label, cu, pos, str, 1);
9,228
Bug 9228 Surround with try-catch works only if the selected code throws a exception
As there are runtime exceptions, wich can be interesting to catch by clients, it would be nice to allow the surround feature on any code snippet. Standard exception could be Throwable.
resolved fixed
5eda0a9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T14:10:53Z
2002-02-07T13:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings(); ImportEdit edit= new ImportEdit(problemPos.getCompilationUnit(), settings); edit.addImport(type.getName()); proposal.getCompilationUnitChange().addTextEdit("import", edit); proposals.add(proposal); } } } public static void addNLSProposals(ProblemPosition problemPos, ArrayList proposals) throws CoreException { final ICompilationUnit cu= problemPos.getCompilationUnit(); String name= CorrectionMessages.getString("LocalCorrectionsSubProcessor.externalizestrings.description"); ChangeCorrectionProposal proposal= new ChangeCorrectionProposal(name, null, 0) { public void apply(IDocument document) { try { NLSRefactoring refactoring= new NLSRefactoring(cu); ExternalizeWizard wizard= new ExternalizeWizard(refactoring); String dialogTitle= CorrectionMessages.getString("LocalCorrectionsSubProcessor.externalizestrings.dialog.title"); new RefactoringStarter().activate(refactoring, wizard, dialogTitle, true); } catch (JavaModelException e) { JavaPlugin.log(e); } } }; proposals.add(proposal); } }
9,228
Bug 9228 Surround with try-catch works only if the selected code throws a exception
As there are runtime exceptions, wich can be interesting to catch by clients, it would be nice to allow the surround feature on any code snippet. Standard exception could be Throwable.
resolved fixed
5eda0a9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T14:10:53Z
2002-02-07T13:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/SurroundWithTryCatchAction.java
package org.eclipse.jdt.ui.actions; import java.lang.reflect.InvocationTargetException; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jface.text.ITextSelection; import org.eclipse.ui.texteditor.AbstractTextEditor; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.ISourceRange; import org.eclipse.jdt.internal.corext.refactoring.base.ChangeContext; import org.eclipse.jdt.internal.corext.refactoring.base.JavaSourceContext; import org.eclipse.jdt.internal.corext.refactoring.base.RefactoringStatus; import org.eclipse.jdt.internal.corext.refactoring.base.RefactoringStatusEntry; import org.eclipse.jdt.internal.corext.refactoring.surround.SurroundWithTryCatchRefactoring; import org.eclipse.jdt.internal.ui.actions.SelectionConverter; import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor; import org.eclipse.jdt.internal.ui.preferences.CodeFormatterPreferencePage; import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings; import org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation; import org.eclipse.jdt.internal.ui.refactoring.RefactoringMessages; import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringErrorDialogUtil; import org.eclipse.jdt.internal.ui.refactoring.changes.AbortChangeExceptionHandler; import org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext; import org.eclipse.jdt.internal.ui.util.ExceptionHandler; public class SurroundWithTryCatchAction extends SelectionDispatchAction {
9,228
Bug 9228 Surround with try-catch works only if the selected code throws a exception
As there are runtime exceptions, wich can be interesting to catch by clients, it would be nice to allow the surround feature on any code snippet. Standard exception could be Throwable.
resolved fixed
5eda0a9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T14:10:53Z
2002-02-07T13:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/SurroundWithTryCatchAction.java
private CompilationUnitEditor fEditor; private static final String TITLE= RefactoringMessages.getString("SurroundWithTryCatchAction.title"); public SurroundWithTryCatchAction(CompilationUnitEditor editor) { super(editor.getEditorSite()); setText(TITLE); fEditor= editor; } protected void run(ITextSelection selection) { SurroundWithTryCatchRefactoring refactoring= new SurroundWithTryCatchRefactoring(getCompilationUnit(), selection, JavaPreferencesSettings.getCodeGenerationSettings()); try { RefactoringStatus status= refactoring.checkActivation(new NullProgressMonitor()); if (status.hasFatalError()) { RefactoringErrorDialogUtil.open(TITLE, status); RefactoringStatusEntry entry= status.getFirstEntry(RefactoringStatus.FATAL); if (entry.getContext() instanceof JavaSourceContext && fEditor != null) { JavaSourceContext context= (JavaSourceContext)entry.getContext();
9,228
Bug 9228 Surround with try-catch works only if the selected code throws a exception
As there are runtime exceptions, wich can be interesting to catch by clients, it would be nice to allow the surround feature on any code snippet. Standard exception could be Throwable.
resolved fixed
5eda0a9
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-06T14:10:53Z
2002-02-07T13:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/SurroundWithTryCatchAction.java
ISourceRange range= context.getSourceRange(); fEditor.setHighlightRange(range.getOffset(), range.getLength(), true); } return; } PerformChangeOperation op= new PerformChangeOperation(refactoring.createChange(new NullProgressMonitor())); op.setChangeContext(new ChangeContext(new AbortChangeExceptionHandler())); new BusyIndicatorRunnableContext().run(false, false, op); } catch (CoreException e) { ExceptionHandler.handle(e, TITLE, RefactoringMessages.getString("SurroundWithTryCatchAction.exception")); } catch (InvocationTargetException e) { ExceptionHandler.handle(e, TITLE, RefactoringMessages.getString("SurroundWithTryCatchAction.exception")); } catch (InterruptedException e) { } } protected void selectionChanged(ITextSelection selection) { setEnabled(selection.getLength() > 0); } private final ICompilationUnit getCompilationUnit() { Object editorInput= SelectionConverter.getInput(fEditor); if (editorInput instanceof ICompilationUnit) return (ICompilationUnit)editorInput; else return null; } }
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
/* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ package org.eclipse.jdt.internal.ui.browsing; import java.util.Collection; import java.util.Comparator; import java.util.Iterator; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IPath; import org.eclipse.swt.SWT; import org.eclipse.swt.dnd.DND; import org.eclipse.swt.dnd.DragSource;
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
import org.eclipse.swt.dnd.DragSourceEvent; import org.eclipse.swt.dnd.Transfer; import org.eclipse.swt.events.DisposeEvent; import org.eclipse.swt.events.DisposeListener; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IMenuListener; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.IStatusLineManager; import org.eclipse.jface.action.IToolBarManager; import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.action.Separator; import org.eclipse.jface.text.ITextSelection; import org.eclipse.jface.util.Assert; import org.eclipse.jface.util.IPropertyChangeListener; import org.eclipse.jface.util.PropertyChangeEvent; import org.eclipse.jface.viewers.DecoratingLabelProvider; import org.eclipse.jface.viewers.DoubleClickEvent; import org.eclipse.jface.viewers.IDoubleClickListener; import org.eclipse.jface.viewers.ILabelDecorator; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ISelection;
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.StructuredViewer; import org.eclipse.ui.IActionBars; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IFileEditorInput; import org.eclipse.ui.IMemento; import org.eclipse.ui.IPartListener; import org.eclipse.ui.ISelectionListener; import org.eclipse.ui.IViewSite; import org.eclipse.ui.IWorkbenchActionConstants; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.IWorkbenchPartSite; import org.eclipse.ui.IWorkingSet; import org.eclipse.ui.PartInitException; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.actions.ActionContext; import org.eclipse.ui.actions.ActionGroup; import org.eclipse.ui.actions.NewWizardMenu; import org.eclipse.ui.actions.OpenWithMenu; import org.eclipse.ui.actions.RefreshAction; import org.eclipse.ui.dialogs.PropertyDialogAction; import org.eclipse.ui.part.ResourceTransfer; import org.eclipse.ui.part.ViewPart; import org.eclipse.jdt.core.IClassFile;
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IMember; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.IWorkingCopy; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.ui.IContextMenuConstants; import org.eclipse.jdt.ui.IWorkingCopyManager; import org.eclipse.jdt.ui.JavaElementLabelProvider; import org.eclipse.jdt.ui.JavaElementSorter; import org.eclipse.jdt.ui.JavaUI; import org.eclipse.jdt.ui.actions.BuildActionGroup; import org.eclipse.jdt.ui.actions.CCPActionGroup; import org.eclipse.jdt.ui.actions.GenerateActionGroup; import org.eclipse.jdt.ui.actions.ImportActionGroup; import org.eclipse.jdt.ui.actions.JavaSearchActionGroup; import org.eclipse.jdt.ui.actions.OpenAction; import org.eclipse.jdt.ui.actions.OpenEditorActionGroup; import org.eclipse.jdt.ui.actions.OpenViewActionGroup; import org.eclipse.jdt.ui.actions.RefactorActionGroup; import org.eclipse.jdt.ui.actions.ShowActionGroup; import org.eclipse.jdt.ui.actions.ShowInNavigatorViewAction; import org.eclipse.jdt.internal.ui.JavaPlugin; import org.eclipse.jdt.internal.ui.actions.CompositeActionGroup; import org.eclipse.jdt.internal.ui.actions.ContextMenuGroup; import org.eclipse.jdt.internal.ui.dnd.DelegatingDragAdapter; import org.eclipse.jdt.internal.ui.dnd.DelegatingDropAdapter; import org.eclipse.jdt.internal.ui.dnd.LocalSelectionTransfer; import org.eclipse.jdt.internal.ui.dnd.ResourceTransferDragAdapter; import org.eclipse.jdt.internal.ui.dnd.TransferDragSourceListener;
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
import org.eclipse.jdt.internal.ui.dnd.TransferDropTargetListener; import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility; import org.eclipse.jdt.internal.ui.javaeditor.IClassFileEditorInput; import org.eclipse.jdt.internal.ui.javaeditor.JarEntryEditorInput; import org.eclipse.jdt.internal.ui.packageview.PackagesMessages; import org.eclipse.jdt.internal.ui.packageview.SelectionTransferDragAdapter; import org.eclipse.jdt.internal.ui.packageview.SelectionTransferDropAdapter; import org.eclipse.jdt.internal.ui.search.JavaSearchGroup; import org.eclipse.jdt.internal.ui.util.JavaUIHelp; import org.eclipse.jdt.internal.ui.viewsupport.BaseJavaElementContentProvider; import org.eclipse.jdt.internal.ui.viewsupport.IProblemChangedListener; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabels; import org.eclipse.jdt.internal.ui.viewsupport.ProblemTableViewer; import org.eclipse.jdt.internal.ui.viewsupport.StandardJavaUILabelProvider; import org.eclipse.jdt.internal.ui.viewsupport.StatusBarUpdater; import org.eclipse.jdt.internal.ui.workingsets.WorkingSetFilter; import org.eclipse.jdt.internal.ui.workingsets.WorkingSetFilterActionGroup; abstract class JavaBrowsingPart extends ViewPart implements IMenuListener, ISelectionListener { private ILabelProvider fLabelProvider; private ILabelProvider fTitleProvider; private StructuredViewer fViewer; private IMemento fMemento; private JavaElementTypeComparator fTypeComparator; private WorkingSetFilterActionGroup fWorkingSetFilterActionGroup; private CCPActionGroup fCCPActionGroup; private BuildActionGroup fBuildActionGroup; private CompositeActionGroup fActionGroups;
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
private Menu fContextMenu; private IWorkbenchPart fPreviousSelectionProvider; private Object fPreviousSelectedElement; private Image fOriginalTitleImage; /* * Ensure selection changed events being processed only if * initiated by user interaction with this part. */ private boolean fProcessSelectionEvents= true; private IPartListener fPartListener= new IPartListener() { public void partActivated(IWorkbenchPart part) { setSelectionFromEditor(part); } public void partBroughtToTop(IWorkbenchPart part) { } public void partClosed(IWorkbenchPart part) { } public void partDeactivated(IWorkbenchPart part) { } public void partOpened(IWorkbenchPart part) { } }; /* * Implements method from IViewPart. */ public void init(IViewSite site, IMemento memento) throws PartInitException { super.init(site, memento); fMemento= memento;
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
} /* * Implements method from IViewPart. */ public void saveState(IMemento memento) { if (fViewer == null) { if (fMemento != null) memento.putMemento(fMemento); return; } fWorkingSetFilterActionGroup.saveState(memento); } protected void restoreState(IMemento memento) { fWorkingSetFilterActionGroup.restoreState(memento); } /** * Creates the search list inner viewer. */ public void createPartControl(Composite parent) { Assert.isTrue(fViewer == null); fTypeComparator= new JavaElementTypeComparator(); fViewer= createViewer(parent); fLabelProvider= createLabelProvider(); ILabelDecorator decorationMgr= PlatformUI.getWorkbench().getDecoratorManager(); fViewer.setLabelProvider(new DecoratingLabelProvider(fLabelProvider, decorationMgr)); fViewer.setSorter(new JavaElementSorter()); fViewer.setUseHashlookup(true);
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
JavaPlugin.getDefault().getProblemMarkerManager().addListener((IProblemChangedListener)fViewer); fTitleProvider= createTitleProvider(); MenuManager menuMgr= new MenuManager("#PopupMenu"); menuMgr.setRemoveAllWhenShown(true); menuMgr.addMenuListener(this); fContextMenu= menuMgr.createContextMenu(fViewer.getControl()); fViewer.getControl().setMenu(fContextMenu); getSite().registerContextMenu(menuMgr, fViewer); getSite().setSelectionProvider(fViewer); createActions(); addKeyListener(); if (fMemento != null) restoreState(fMemento); fMemento= null; getSite().setSelectionProvider(fViewer); IStatusLineManager slManager= getViewSite().getActionBars().getStatusLineManager(); fViewer.addSelectionChangedListener(new StatusBarUpdater(slManager)); hookViewerListeners(); addFilters(); fViewer.setContentProvider(createContentProvider()); setInitialInput(); initDragAndDrop();
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
setInitialSelection(); getViewSite().getWorkbenchWindow().getSelectionService().addSelectionListener(this); getViewSite().getPage().addPartListener(fPartListener); fillActionBars(); setHelp(); } private void initDragAndDrop() { int ops= DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK; Transfer[] transfers= new Transfer[] { LocalSelectionTransfer.getInstance(), ResourceTransfer.getInstance()}; TransferDropTargetListener[] dropListeners= new TransferDropTargetListener[] { new SelectionTransferDropAdapter(fViewer) }; fViewer.addDropSupport(ops, transfers, new DelegatingDropAdapter(dropListeners)); Control control= fViewer.getControl(); TransferDragSourceListener[] dragListeners= new TransferDragSourceListener[] { new SelectionTransferDragAdapter(fViewer), new ResourceTransferDragAdapter(fViewer) };
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
DragSource source= new DragSource(control, ops); source.addDragListener(new DelegatingDragAdapter(dragListeners) { public void dragStart(DragSourceEvent event) { IStructuredSelection selection= (IStructuredSelection)getSelectionProvider().getSelection(); for (Iterator iter= selection.iterator(); iter.hasNext(); ) { if (iter.next() instanceof IMember) { setPossibleListeners(new TransferDragSourceListener[] {new SelectionTransferDragAdapter(fViewer)}); break; } } super.dragStart(event); } }); } protected void fillActionBars() { IActionBars actionBars= getViewSite().getActionBars(); IToolBarManager toolBar= actionBars.getToolBarManager(); fillToolBar(toolBar); fWorkingSetFilterActionGroup.fillActionBars(getViewSite().getActionBars()); actionBars.updateActionBars(); fActionGroups.fillActionBars(actionBars); }
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
public void setFocus() { fViewer.getControl().setFocus(); } public void dispose() { if (fViewer != null) { JavaPlugin.getDefault().getProblemMarkerManager().removeListener((IProblemChangedListener)fViewer); getViewSite().getWorkbenchWindow().getSelectionService().removeSelectionListener(this); getViewSite().getPage().removePartListener(fPartListener); fViewer= null; } if (fActionGroups != null) fActionGroups.dispose(); super.dispose(); } /** * Adds the KeyListener */ protected void addKeyListener() { fViewer.getControl().addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent event) { handleKeyReleased(event); } }); } protected void handleKeyReleased(KeyEvent event) { if (event.stateMask != 0)
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
return; int key= event.keyCode; IAction action; if (key == SWT.F5) { action= fBuildActionGroup.getRefreshAction(); if (action.isEnabled()) action.run(); } if (event.character == SWT.DEL) { action= fCCPActionGroup.getDeleteAction(); if (action.isEnabled()) action.run(); } } protected void fillToolBar(IToolBarManager tbm) { } /** * Called when the context menu is about to open. * Override to add your own context dependent menu contributions. */ public void menuAboutToShow(IMenuManager menu) { JavaPlugin.createStandardGroups(menu); IStructuredSelection selection= (IStructuredSelection) fViewer.getSelection(); int size= selection.size(); Object element= selection.getFirstElement(); IJavaElement jElement= element instanceof IJavaElement ? (IJavaElement)element : null;
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
if (size == 0 || (size == 1 && isNewTarget(jElement))) { MenuManager newMenu= new MenuManager(PackagesMessages.getString("PackageExplorer.new")); menu.appendToGroup(IContextMenuConstants.GROUP_NEW, newMenu); new NewWizardMenu(newMenu, getSite().getWorkbenchWindow(), false); } if (size == 1) addOpenNewWindowAction(menu, element); fActionGroups.setContext(new ActionContext(selection)); fActionGroups.fillContextMenu(menu); fActionGroups.setContext(null); } private boolean isNewTarget(IJavaElement element) { if (element == null) return false; int type= element.getElementType(); return type == IJavaElement.JAVA_PROJECT || type == IJavaElement.PACKAGE_FRAGMENT_ROOT || type == IJavaElement.PACKAGE_FRAGMENT; } private void addOpenNewWindowAction(IMenuManager menu, Object element) { if (element instanceof IJavaElement) { try { element= ((IJavaElement)element).getCorrespondingResource(); } catch(JavaModelException e) { } } if (!(element instanceof IContainer)) return;
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
menu.appendToGroup( IContextMenuConstants.GROUP_OPEN, new PatchedOpenInNewWindowAction(getSite().getWorkbenchWindow(), (IContainer)element)); } private void createActions() { fActionGroups= new CompositeActionGroup(new ActionGroup[] { new OpenEditorActionGroup(this), new OpenViewActionGroup(this), new ShowActionGroup(this), fCCPActionGroup= new CCPActionGroup(this), new RefactorActionGroup(this), new ImportActionGroup(this), new GenerateActionGroup(this), fBuildActionGroup= new BuildActionGroup(this), new JavaSearchActionGroup(this, getViewer())}); String viewId= getConfigurationElement().getAttribute("id"); Assert.isNotNull(viewId); IPropertyChangeListener titleUpdater= new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { String property= event.getProperty(); if (IWorkingSet.CHANGE_WORKING_SET_NAME_CHANGE.equals(property)) updateTitle(); } }; fWorkingSetFilterActionGroup= new WorkingSetFilterActionGroup(fViewer, viewId, getShell(), titleUpdater); } /** * Returns the shell to use for opening dialogs.
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
* Used in this class, and in the actions. */ private Shell getShell() { return fViewer.getControl().getShell(); } protected final Display getDisplay() { return fViewer.getControl().getDisplay(); } /** * Returns the selection provider. */ ISelectionProvider getSelectionProvider() { return fViewer; } /** * Answers if the given <code>element</code> is a valid * input for this part. * * @param element the object to test * @return <true> if the given element is a valid input */ abstract protected boolean isValidInput(Object element); /** * Answers if the given <code>element</code> is a valid * element for this part. * * @param element the object to test * @return <true> if the given element is a valid element */ protected boolean isValidElement(Object element) {
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
if (element == null) return false; element= getSuitableJavaElement(element); if (element == null) return false; Object input= getViewer().getInput(); if (input == null) return false; if (input instanceof Collection) return ((Collection)input).contains(element); else return input.equals(element); } private boolean isInputResetBy(Object newInput, Object input, IWorkbenchPart part) { if (newInput == null) return part == fPreviousSelectionProvider; if (input instanceof IJavaElement && newInput instanceof IJavaElement) return getTypeComparator().compare(newInput, input) > 0; else return false; } private boolean isInputResetBy(IWorkbenchPart part) { if (!(part instanceof JavaBrowsingPart)) return true; Object thisInput= getViewer().getInput(); Object partInput= ((JavaBrowsingPart)part).getViewer().getInput(); if (thisInput instanceof IJavaElement && partInput instanceof IJavaElement) return getTypeComparator().compare(partInput, thisInput) > 0; else
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
return true; } protected boolean isAncestorOf(Object ancestor, Object element) { if (element instanceof IJavaElement && ancestor instanceof IJavaElement) return !element.equals(ancestor) && internalIsAncestorOf((IJavaElement)ancestor, (IJavaElement)element); return false; } private boolean internalIsAncestorOf(IJavaElement ancestor, IJavaElement element) { if (element != null) return element.equals(ancestor) || internalIsAncestorOf(ancestor, element.getParent()); else return false; } public void selectionChanged(IWorkbenchPart part, ISelection selection) { if (!fProcessSelectionEvents || part == this || !(selection instanceof IStructuredSelection)) return; Object selectedElement= getSingleElementFromSelection(selection); if (selectedElement != null && part.equals(fPreviousSelectionProvider) && selectedElement.equals(fPreviousSelectedElement)) return; fPreviousSelectedElement= selectedElement; Object currentInput= (IJavaElement)getViewer().getInput(); if (selectedElement != null && selectedElement.equals(currentInput)) { IJavaElement elementToSelect= findElementToSelect(getSingleElementFromSelection(selection)); if (elementToSelect != null && getTypeComparator().compare(selectedElement, elementToSelect) < 0)
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
setSelection(new StructuredSelection(elementToSelect), true); fPreviousSelectionProvider= part; return; } if (part != fPreviousSelectionProvider && selectedElement != null && !selectedElement.equals(currentInput) && isInputResetBy(selectedElement, currentInput, part)) { if (!isAncestorOf(selectedElement, currentInput)) setInput(null); fPreviousSelectionProvider= part; return; } else if (selection.isEmpty() && !isInputResetBy(part)) { fPreviousSelectionProvider= part; return; } else if (selectedElement == null && part == fPreviousSelectionProvider) { setInput(null); fPreviousSelectionProvider= part; return; } fPreviousSelectionProvider= part; if (selectedElement instanceof IJavaElement) adjustInputAndSetSelection((IJavaElement)selectedElement); else setSelection(StructuredSelection.EMPTY, true); } protected void setInput(Object input) { if (input == null) setTitleImage(fOriginalTitleImage);
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
else if (input instanceof Collection) { if (((Collection)input).isEmpty()) setTitleImage(fOriginalTitleImage); else { Object firstElement= ((Collection)input).iterator().next(); setTitleImage(fTitleProvider.getImage(firstElement)); } } else setTitleImage(fTitleProvider.getImage(input)); setViewerInput(input); updateTitle(); } private void setViewerInput(Object input) { fProcessSelectionEvents= false; fViewer.setInput(input); fProcessSelectionEvents= true; } void updateTitle() { setTitleToolTip(getToolTipText(fViewer.getInput())); } /** * Returns the tool tip text for the given element. */ String getToolTipText(Object element) { String result; if (!(element instanceof IResource)) { result= JavaElementLabels.getTextLabel(element, StandardJavaUILabelProvider.DEFAULT_TEXTFLAGS); } else { IPath path= ((IResource) element).getFullPath(); if (path.isRoot()) {
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
result= getConfigurationElement().getAttribute("name"); } else { result= path.makeRelative().toString(); } } if (fWorkingSetFilterActionGroup == null || fWorkingSetFilterActionGroup.getWorkingSet() == null) return result; IWorkingSet ws= fWorkingSetFilterActionGroup.getWorkingSet(); String wsstr= JavaBrowsingMessages.getFormattedString("JavaBrowsingPart.toolTip", new String[] { ws.getName() }); if (result.length() == 0) return wsstr; return JavaBrowsingMessages.getFormattedString("JavaBrowsingPart.toolTip2", new String[] { result, ws.getName() }); } public String getTitleToolTip() { if (fViewer == null) return super.getTitleToolTip(); return getToolTipText(fViewer.getInput()); } /** * Sets or clears the title image of this part and * store the orignal image on the first call. */ protected void setTitleImage(Image titleImage) { if (fOriginalTitleImage == null) fOriginalTitleImage= getTitleImage(); if (titleImage == null) titleImage= fOriginalTitleImage; super.setTitleImage(titleImage);
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
} protected final StructuredViewer getViewer() { return fViewer; } protected ILabelProvider createLabelProvider() { return new StandardJavaUILabelProvider( StandardJavaUILabelProvider.DEFAULT_TEXTFLAGS, StandardJavaUILabelProvider.DEFAULT_IMAGEFLAGS | JavaElementImageProvider.SMALL_ICONS, StandardJavaUILabelProvider.getAdornmentProviders(true, null) ); } protected ILabelProvider createTitleProvider() { return new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_BASICS | JavaElementLabelProvider.SHOW_SMALL_ICONS); } protected final ILabelProvider getLabelProvider() { return fLabelProvider; } protected final ILabelProvider getTitleProvider() { return fTitleProvider; } /** * Creates the the viewer of this part. * * @param parent the parent for the viewer */ protected StructuredViewer createViewer(Composite parent) { return new ProblemTableViewer(parent, SWT.MULTI); } protected int getLabelProviderFlags() {
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
return JavaElementLabelProvider.SHOW_BASICS | JavaElementLabelProvider.SHOW_OVERLAY_ICONS | JavaElementLabelProvider.SHOW_SMALL_ICONS | JavaElementLabelProvider.SHOW_VARIABLE | JavaElementLabelProvider.SHOW_PARAMETERS; } /** * Adds filters the viewer of this part. */ protected void addFilters() { } /** * Creates the the content provider of this part. */ protected BaseJavaElementContentProvider createContentProvider() { return new JavaElementContentProvider(true, this); } protected void setInitialInput() { ISelection selection= getSite().getPage().getSelection(); Object input= getSingleElementFromSelection(selection); if (!(input instanceof IJavaElement)) { input= getSite().getPage().getInput(); if (!(input instanceof IJavaElement) && input instanceof IAdaptable) input= ((IAdaptable)input).getAdapter(IJavaElement.class); } setInput(findInputForJavaElement((IJavaElement)input)); } protected void setInitialSelection() { Object input;
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
ISelection selection= getSite().getPage().getSelection(); if (selection != null && !selection.isEmpty()) input= getSingleElementFromSelection(selection); else { input= getSite().getPage().getInput(); if (!(input instanceof IJavaElement)) { if (input instanceof IAdaptable) input= ((IAdaptable)input).getAdapter(IJavaElement.class); else return; } } if (findElementToSelect((IJavaElement)input) != null) adjustInputAndSetSelection((IJavaElement)input); } final protected void setHelp() { JavaUIHelp.setHelp(fViewer, getHelpContextId()); } /** * Returns the context ID for the Help system * * @return the string used as ID for the Help context */ abstract protected String getHelpContextId(); /** * Adds additional listeners to this view. */ protected void hookViewerListeners() { fViewer.addSelectionChangedListener(new ISelectionChangedListener() {
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
public void selectionChanged(SelectionChangedEvent event) { if (!fProcessSelectionEvents) return; if (JavaBrowsingPreferencePage.openEditorOnSingleClick()) new ShowInEditorAction().run(event.getSelection(), getSite().getPage()); else if (JavaBrowsingPart.this.equals(getSite().getPage().getActivePart())) linkToEditor((IStructuredSelection)event.getSelection()); } }); fViewer.addDoubleClickListener(new IDoubleClickListener() { public void doubleClick(DoubleClickEvent event) { if (fProcessSelectionEvents && !JavaBrowsingPreferencePage.openEditorOnSingleClick()) new ShowInEditorAction().run(event.getSelection(), getSite().getPage()); } }); } void adjustInputAndSetSelection(IJavaElement je) { je= getSuitableJavaElement(je); IJavaElement elementToSelect= findElementToSelect(je); IJavaElement newInput= findInputForJavaElement(je); if (elementToSelect == null && !isValidInput(newInput)) setInput(null); else if (elementToSelect == null || getViewer().testFindItem(elementToSelect) == null) setInput(findInputForJavaElement(je)); if (elementToSelect != null) setSelection(new StructuredSelection(elementToSelect), true); else
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
setSelection(StructuredSelection.EMPTY, true); } /** * Finds the closest Java element which can be used as input for * this part and has the given Java element as child * * @param je the Java element for which to search the closest input * @return the closest Java element used as input for this part */ protected IJavaElement findInputForJavaElement(IJavaElement je) { if (je == null || !je.exists()) return null; if (isValidInput(je)) return je; return findInputForJavaElement(je.getParent()); } final protected IJavaElement findElementToSelect(Object obj) { if (obj instanceof IJavaElement) return findElementToSelect((IJavaElement)obj); return null; } /** * Finds the element which has to be selected in this part. * * @param je the Java element which has the focus */ abstract protected IJavaElement findElementToSelect(IJavaElement je);
15,157
Bug 15157 New-> menu disappears when folder is selected
Build: 20020501 The New-> menu in the packages view is not added to the pop-up menu when a folder is selected. It is added when a source folder is selected.
resolved fixed
a6f6f3f
JDT
https://github.com/eclipse-jdt/eclipse.jdt.ui
eclipse-jdt/eclipse.jdt.ui
java
null
null
null
2002-05-07T11:00:09Z
2002-05-02T22:53:20Z
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
private Object getSingleElementFromSelection(ISelection selection) { if (!(selection instanceof StructuredSelection) || selection.isEmpty()) return null; Iterator iter= ((StructuredSelection)selection).iterator(); Object firstElement= iter.next(); if (!(firstElement instanceof IJavaElement)) { if (firstElement instanceof IAdaptable) return (IJavaElement)((IAdaptable)firstElement).getAdapter(IJavaElement.class); else return firstElement; } Object currentInput= (IJavaElement)getViewer().getInput(); if (currentInput == null || !currentInput.equals(findInputForJavaElement((IJavaElement)firstElement))) if (iter.hasNext()) return null; else return firstElement; while (iter.hasNext()) { Object element= iter.next(); if (!(element instanceof IJavaElement)) return null; if (!currentInput.equals(findInputForJavaElement((IJavaElement)element))) return null; } return firstElement; }