This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 113912 - Drag and Drop Is allowed when it shouldn't be
Summary: Drag and Drop Is allowed when it shouldn't be
Status: RESOLVED WONTFIX
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on: 114041
Blocks:
  Show dependency tree
 
Reported: 2007-08-27 22:43 UTC by tonybeckham
Modified: 2016-07-07 09:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tonybeckham 2007-08-27 22:43:42 UTC
For all systems and JDK's

Drag and Drop of a schema should not be allowed unless the destination is a dependent project.

Steps:
1. Create BPEL BluePrint1 Sample
2. Drag and Drop Purchase Order schema from BPEL module BluePrint1 to BluePrint1Application 
3. Choose Refactor from dialog
4. The file is removed from BluePrint1 but its new location is unknown
5. Select undo move from the refactor menu item
6. Get exception:

java.lang.NullPointerException: Passed null to FileOwnerQuery.getOwner(FileObject)
	at org.netbeans.api.project.FileOwnerQuery.getOwner(FileOwnerQuery.java:72)
	at org.netbeans.modules.xml.refactoring.spi.SharedUtils.inSameProject(SharedUtils.java:830)
	at
org.netbeans.modules.xml.refactoring.XMLRefactoringTransaction.updateTargetModelReferences(XMLRefactoringTransaction.java:749)
	at org.netbeans.modules.xml.refactoring.XMLRefactoringTransaction.undoRenameFile(XMLRefactoringTransaction.java:539)
	at org.netbeans.modules.xml.refactoring.XMLRefactoringTransaction.access$100(XMLRefactoringTransaction.java:72)
	at
org.netbeans.modules.xml.refactoring.XMLRefactoringTransaction$GeneralChangeExecutor$FileRenameUndoable.undo(XMLRefactoringTransaction.java:834)
	at javax.swing.undo.UndoManager.undoTo(UndoManager.java:320)
	at javax.swing.undo.UndoManager.undo(UndoManager.java:398)
	at org.netbeans.modules.xml.refactoring.XMLRefactoringTransaction.rollback(XMLRefactoringTransaction.java:138)
	at org.netbeans.modules.refactoring.api.RefactoringSession.undoRefactoring(RefactoringSession.java:132)
	at org.netbeans.modules.refactoring.spi.impl.UndoManager$SessionUndoItem.undo(UndoManager.java:556)
	at org.netbeans.modules.refactoring.spi.impl.UndoManager.undo(UndoManager.java:192)
	at org.netbeans.modules.refactoring.spi.impl.UndoAction.performAction(UndoAction.java:74)
	at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:96)
	at org.netbeans.modules.openide.util.ActionsBridge$ActionRunnable.actionPerformed(ActionsBridge.java:89)
	at org.netbeans.core.ModuleActions.invokeAction(ModuleActions.java:82)
	at org.netbeans.modules.openide.actions.ActionsBridgeImpl.invokeAction(ActionsBridgeImpl.java:30)
	at org.netbeans.modules.openide.util.ActionsBridge$ActionRunnable.doRun(ActionsBridge.java:80)
	at org.netbeans.modules.openide.util.ActionsBridge$1.run(ActionsBridge.java:49)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:539)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:964)


User should not be allowed to DnD to a non referenced project.
Comment 1 Sonali Kochar 2007-08-27 22:51:49 UTC
1) When you DnD a schema file to a destination, the Move Refactoring GUI is displayed. The Move refactoring GUI will
display all the valid destination projects in the Project combo box and in this particular case will NOT display the
BluePrint1Application in the Project combo box. But the filer is correct in saying that if the move is not allowed, we
should not even display the GUI but show a stop icon. I will fix this.

2) The file is moved to whatever location was selected in the MoveRefactoring GUI. In this case, it would have moved to
BluePrint1/src
I am lookin at the NPE as part of another bug.
Comment 2 Sonali Kochar 2007-08-28 18:01:44 UTC
Currently, there is no core refactoring API available to determine the DnD target. I have filed a RFE on the core:

http://www.netbeans.org/issues/show_bug.cgi?id=114041
Need API to determine DnD target

Once this API is available, I should be able to proceed on this bug fix
Comment 3 Martin Balin 2016-07-07 09:56:50 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss