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 100284 Details for
Bug 231950
NPE when using connection handles and the Palette is hidden
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
takes into account the tool from the palette root.
231950_2.patch (text/plain), 2.40 KB, created by
James Bruck
on 2008-05-14 15:40:25 EDT
(
hide
)
Description:
takes into account the tool from the palette root.
Filename:
MIME Type:
Creator:
James Bruck
Created:
2008-05-14 15:40:25 EDT
Size:
2.40 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.gef >Index: src/org/eclipse/gef/EditDomain.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.gef/plugins/org.eclipse.gef/src/org/eclipse/gef/EditDomain.java,v >retrieving revision 1.21 >diff -u -r1.21 EditDomain.java >--- src/org/eclipse/gef/EditDomain.java 29 Mar 2005 23:57:34 -0000 1.21 >+++ src/org/eclipse/gef/EditDomain.java 14 May 2008 19:39:36 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2005 IBM Corporation and others. >+ * Copyright (c) 2000, 2008 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -135,11 +135,14 @@ > } > > private void handlePaletteToolChanged() { >- ToolEntry entry = getPaletteViewer().getActiveTool(); >- if (entry != null) >- setActiveTool(entry.createTool()); >- else >- setActiveTool(getDefaultTool()); >+ PaletteViewer paletteViewer = getPaletteViewer(); >+ if(paletteViewer != null){ >+ ToolEntry entry = paletteViewer.getActiveTool(); >+ if (entry != null) >+ setActiveTool(entry.createTool()); >+ else >+ setActiveTool(getDefaultTool()); >+ } > } > > /** >@@ -181,16 +184,22 @@ > * then that tool is loaded. If not, the EditDomain's default tool is loaded. By default, > * this is the {@link org.eclipse.gef.tools.SelectionTool}. > */ >-public void loadDefaultTool() { >- setActiveTool(null); >- if (paletteRoot != null) { >- if (paletteRoot.getDefaultEntry() != null) { >- getPaletteViewer().setActiveTool(paletteRoot.getDefaultEntry()); >- return; >- } else >- getPaletteViewer().setActiveTool(null); >- } >- setActiveTool(getDefaultTool()); >+ public void loadDefaultTool() { >+ setActiveTool(null); >+ PaletteViewer paletteViewer = getPaletteViewer(); >+ if (paletteRoot != null && paletteViewer != null) { >+ if (paletteRoot.getDefaultEntry() != null) { >+ paletteViewer.setActiveTool(paletteRoot.getDefaultEntry()); >+ return; >+ } else >+ paletteViewer.setActiveTool(null); >+ } >+ >+ if (paletteRoot != null && paletteRoot.getDefaultEntry() != null) { >+ setActiveTool(paletteRoot.getDefaultEntry().createTool()); >+ } else { >+ setActiveTool(getDefaultTool()); >+ } > } > > /**
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
Flags:
ahunter.eclipse
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 231950
:
100064
| 100284