Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 38165 Details for
Bug 135658
Breakpoint properties dialog quickly shows an error message
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch
135658 (text/plain), 10.52 KB, created by
Michael Rennie
on 2006-04-10 12:34:02 EDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Michael Rennie
Created:
2006-04-10 12:34:02 EDT
Size:
10.52 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.debug.ui >Index: ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaLineBreakpointPage.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaLineBreakpointPage.java,v >retrieving revision 1.16 >diff -u -r1.16 JavaLineBreakpointPage.java >--- ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaLineBreakpointPage.java 29 Mar 2006 15:31:07 -0000 1.16 >+++ ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaLineBreakpointPage.java 10 Apr 2006 16:21:38 -0000 >@@ -233,7 +233,8 @@ > conditionComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); > conditionComposite.setLayout(new GridLayout()); > fEnableConditionButton= createCheckButton(conditionComposite, label); >- fEnableConditionButton.setSelection(breakpoint.isConditionEnabled()); >+ boolean condition = breakpoint.isConditionEnabled(); >+ fEnableConditionButton.setSelection(condition); > fEnableConditionButton.addSelectionListener(new SelectionAdapter() { > public void widgetSelected(SelectionEvent e) { > setConditionEnabled(fEnableConditionButton.getSelection()); >@@ -248,7 +249,7 @@ > } else { > fConditionHasChanged.setSelection(true); > } >- setConditionEnabled(fEnableConditionButton.getSelection()); >+ setConditionEnabled(condition); > } > > /** >Index: ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaBreakpointPage.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaBreakpointPage.java,v >retrieving revision 1.29 >diff -u -r1.29 JavaBreakpointPage.java >--- ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaBreakpointPage.java 29 Mar 2006 15:31:07 -0000 1.29 >+++ ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaBreakpointPage.java 10 Apr 2006 16:21:38 -0000 >@@ -132,54 +132,28 @@ > */ > protected void doStore() throws CoreException { > IJavaBreakpoint breakpoint= getBreakpoint(); >- storeSuspendPolicy(breakpoint); >- storeHitCount(breakpoint); >- storeEnabled(breakpoint); >- } >- >- /** >- * Stores the value of the enabled state in the breakpoint. >- * @param breakpoint the breakpoint to update >- * @throws CoreException if an exception occurs while setting >- * the enabled state >- */ >- private void storeEnabled(IJavaBreakpoint breakpoint) throws CoreException { >- boolean enabled= fEnabledButton.getSelection(); >- breakpoint.setEnabled(enabled); >- } >- >- /** >- * Stores the value of the hit count in the breakpoint. >- * @param breakpoint the breakpoint to update >- * @throws CoreException if an exception occurs while setting >- * the hit count >- */ >- private void storeHitCount(IJavaBreakpoint breakpoint) throws CoreException { >- boolean hitCountEnabled= fHitCountButton.getSelection(); >- int hitCount= -1; >- if (hitCountEnabled) { >+ //store the enabled state >+ breakpoint.setEnabled(fEnabledButton.getSelection()); >+ >+ //store the suspend policy >+ int suspendPolicy = IJavaBreakpoint.SUSPEND_VM; >+ if(fSuspendPolicy.getSelectionIndex() == 0) { >+ suspendPolicy = IJavaBreakpoint.SUSPEND_THREAD; >+ } >+ breakpoint.setSuspendPolicy(suspendPolicy); >+ >+ //store the hit count >+ int hitCount = -1; >+ if (fHitCountButton.getSelection()) { > try { >- hitCount= Integer.parseInt(fHitCountText.getText()); >+ hitCount = Integer.parseInt(fHitCountText.getText()); > } catch (NumberFormatException e) { > JDIDebugUIPlugin.log(new Status(IStatus.ERROR, JDIDebugUIPlugin.getUniqueIdentifier(), IStatus.ERROR, MessageFormat.format(PropertyPageMessages.JavaBreakpointPage_2, new String[] { fHitCountText.getText() }), e)); > } > } > breakpoint.setHitCount(hitCount); > } >- >- /** >- * Stores the value of the suspend policy in the breakpoint. >- * @param breakpoint the breakpoint to update >- * @throws CoreException if an exception occurs while setting the suspend policy >- */ >- private void storeSuspendPolicy(IJavaBreakpoint breakpoint) throws CoreException { >- int suspendPolicy= IJavaBreakpoint.SUSPEND_VM; >- if(fSuspendPolicy.getSelectionIndex() == 0) { >- suspendPolicy = IJavaBreakpoint.SUSPEND_THREAD; >- } >- breakpoint.setSuspendPolicy(suspendPolicy); >- } >- >+ > /** > * Creates the labels and editors displayed for the breakpoint. > * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite) >@@ -193,9 +167,8 @@ > createHitCountEditor(mainComposite); > createTypeSpecificEditors(mainComposite); > createSuspendPolicyEditor(mainComposite); // Suspend policy is considered uncommon. Add it last. >- } catch (CoreException e) { >- JDIDebugUIPlugin.log(e); >- } >+ } >+ catch (CoreException e) {JDIDebugUIPlugin.log(e);} > setValid(true); > // if this breakpoint is being created, change the shell title to indicate 'creation' > try { >@@ -206,18 +179,14 @@ > shell.setText(MessageFormat.format(PropertyPageMessages.JavaBreakpointPage_10, new String[]{getName(getBreakpoint())})); > shell.removeShellListener(this); > } >- public void shellClosed(ShellEvent e) { >- } >- public void shellDeactivated(ShellEvent e) { >- } >- public void shellDeiconified(ShellEvent e) { >- } >- public void shellIconified(ShellEvent e) { >- } >+ public void shellClosed(ShellEvent e) {} >+ public void shellDeactivated(ShellEvent e) {} >+ public void shellDeiconified(ShellEvent e) {} >+ public void shellIconified(ShellEvent e) {} > }); > } >- } catch (CoreException e) { >- } >+ } >+ catch (CoreException e) {} > return mainComposite; > } > >@@ -261,10 +230,10 @@ > * editor will be created. > */ > private void createSuspendPolicyEditor(Composite parent) throws CoreException { >- IJavaBreakpoint breakpoint= getBreakpoint(); >+ IJavaBreakpoint breakpoint = getBreakpoint(); > Composite comp = createComposite(parent, 2); > createLabel(comp, PropertyPageMessages.JavaBreakpointPage_6); >- boolean suspendThread= breakpoint.getSuspendPolicy() == IJavaBreakpoint.SUSPEND_THREAD; >+ boolean suspendThread = breakpoint.getSuspendPolicy() == IJavaBreakpoint.SUSPEND_THREAD; > fSuspendPolicy = new Combo(comp, SWT.BORDER|SWT.READ_ONLY); > fSuspendPolicy.add(PropertyPageMessages.JavaBreakpointPage_7); > fSuspendPolicy.add(PropertyPageMessages.JavaBreakpointPage_8); >@@ -279,24 +248,24 @@ > * will be created > */ > private void createHitCountEditor(Composite parent) throws CoreException { >- IJavaBreakpoint breakpoint= getBreakpoint(); >- Composite hitCountComposite= createComposite(parent, 2); >- fHitCountButton= createCheckButton(hitCountComposite, PropertyPageMessages.JavaBreakpointPage_4); >+ IJavaBreakpoint breakpoint = getBreakpoint(); >+ Composite hitCountComposite = createComposite(parent, 2); >+ fHitCountButton = createCheckButton(hitCountComposite, PropertyPageMessages.JavaBreakpointPage_4); > fHitCountButton.addSelectionListener(new SelectionAdapter() { > public void widgetSelected(SelectionEvent event) { > fHitCountText.setEnabled(fHitCountButton.getSelection()); > hitCountChanged(); > } > }); >- int hitCount= breakpoint.getHitCount(); >- String hitCountString= EMPTY_STRING; >+ int hitCount = breakpoint.getHitCount(); >+ String hitCountString = EMPTY_STRING; > if (hitCount > 0) { >- hitCountString= new Integer(hitCount).toString(); >+ hitCountString = new Integer(hitCount).toString(); > fHitCountButton.setSelection(true); > } else { > fHitCountButton.setSelection(false); > } >- fHitCountText= createText(hitCountComposite, hitCountString); >+ fHitCountText = createText(hitCountComposite, hitCountString); > if (hitCount <= 0) { > fHitCountText.setEnabled(false); > } >@@ -317,7 +286,7 @@ > return; > } > String hitCountText= fHitCountText.getText(); >- int hitCount= -1; >+ int hitCount = -1; > try { > hitCount= Integer.parseInt(hitCountText); > } catch (NumberFormatException e1) { >Index: ui/org/eclipse/jdt/internal/debug/ui/propertypages/BreakpointConditionEditor.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/BreakpointConditionEditor.java,v >retrieving revision 1.27 >diff -u -r1.27 BreakpointConditionEditor.java >--- ui/org/eclipse/jdt/internal/debug/ui/propertypages/BreakpointConditionEditor.java 7 Apr 2006 01:42:41 -0000 1.27 >+++ ui/org/eclipse/jdt/internal/debug/ui/propertypages/BreakpointConditionEditor.java 10 Apr 2006 16:21:38 -0000 >@@ -50,8 +50,7 @@ > public class BreakpointConditionEditor { > > private JDISourceViewer fViewer; >- private IContentAssistProcessor fCompletionProcessor; >-// private boolean fIsValid; >+ private IContentAssistProcessor fCompletionProcessor; > private String fOldValue; > private String fErrorMessage; > private JavaLineBreakpointPage fPage; >@@ -87,8 +86,8 @@ > } > else { > try { >- String source= null; >- ICompilationUnit compilationUnit= type.getCompilationUnit(); >+ String source = null; >+ ICompilationUnit compilationUnit = type.getCompilationUnit(); > if (compilationUnit != null) { > source = compilationUnit.getSource(); > } >@@ -117,6 +116,7 @@ > } > }); > fViewer.setEditable(true); >+ document.set(condition); > fViewer.setDocument(document); > fViewer.setUndoManager(new TextViewerUndoManager(10)); > fViewer.getUndoManager().connect(fViewer); >@@ -132,9 +132,6 @@ > gd.heightHint = fPage.convertHeightInCharsToPixels(10); > gd.widthHint = fPage.convertWidthInCharsToPixels(40); > fViewer.getControl().setLayoutData(gd); >- document.set(condition); >- valueChanged(); >- > fHandler = new AbstractHandler() { > public Object execute(ExecutionEvent event) throws org.eclipse.core.commands.ExecutionException { > fViewer.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS); >@@ -194,11 +191,11 @@ > * Handle that the value changed > */ > protected void valueChanged() { >- refreshValidState(); > String newValue = fViewer.getDocument().get(); > if (!newValue.equals(fOldValue)) { > fOldValue = newValue; > } >+ refreshValidState(); > } > > /**
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 135658
: 38165