Bug 73643

Summary: Cannot add additional include or library directory
Product: cnd Reporter: Martin Ryzl <mryzl>
Component: -- Other --Assignee: Thomas Preisler <thp>
Status: VERIFIED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P1 CC:
Version: 5.x   
Target Milestone: TBD   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Issue Type: DEFECT Exception Report:

Description Martin Ryzl 2006-03-16 12:19:17 UTC
Milestone 2
When adding an additional directory as relatice and directory is under project
folder, ie.:
project - c:\projects\Application1
my directory - c:\projects\Application1\nokia

it is not added and the following exception appears in the console. It can be
added as absolute if it is somewhere else:


java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.StringBuffer.charAt(StringBuffer.java:163)
        at org.netbeans.modules.cnd.api.utils.IpeUtils.getRelativePath(IpeUtils.
java:136)
        at org.netbeans.modules.cnd.api.utils.IpeUtils.toRelativePath(IpeUtils.j
ava:184)
        at org.netbeans.modules.cnd.makeproject.ui.utils.DirectoryChooserPanel$M
yListEditorPanel.addAction(DirectoryChooserPanel.java:203)
        at org.netbeans.modules.cnd.makeproject.ui.utils.ListEditorPanel.addObje
ctAction(ListEditorPanel.java:576)
        at org.netbeans.modules.cnd.makeproject.ui.utils.ListEditorPanel.addButt
onActionPerformed(ListEditorPanel.java:592)
        at org.netbeans.modules.cnd.makeproject.ui.utils.ListEditorPanel.access$
400(ListEditorPanel.java:28)
        at org.netbeans.modules.cnd.makeproject.ui.utils.ListEditorPanel$3.actio
nPerformed(ListEditorPanel.java:308)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:18
49)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
a:2169)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:420)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258
)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
istener.java:234)
        at java.awt.Component.processMouseEvent(Component.java:5488)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
        at java.awt.Component.processEvent(Component.java:5253)
        at java.awt.Container.processEvent(Container.java:1966)
        at java.awt.Component.dispatchEventImpl(Component.java:3955)
        at java.awt.Container.dispatchEventImpl(Container.java:2024)
        at java.awt.Component.dispatchEvent(Component.java:3803)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212
)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)

        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
        at java.awt.Container.dispatchEventImpl(Container.java:2010)
        at java.awt.Window.dispatchEventImpl(Window.java:1774)
        at java.awt.Component.dispatchEvent(Component.java:3803)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
[catch] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:242)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:163)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:153)
        at java.awt.Dialog$1.run(Dialog.java:515)
        at java.awt.Dialog.show(Dialog.java:536)
        at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.
java:810)
        at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.jav
a:853)
        at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:8
41)
        at org.openide.util.Mutex.doEventAccess(Mutex.java:1172)
        at org.openide.util.Mutex.readAccess(Mutex.java:209)
        at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:
826)
        at org.openide.explorer.propertysheet.CustomEditorAction.actionPerformed
(CustomEditorAction.java:301)
        at org.openide.explorer.propertysheet.SheetTable.processMouseEvent(Sheet
Table.java:679)
        at java.awt.Component.processEvent(Component.java:5253)
        at java.awt.Container.processEvent(Container.java:1966)
        at java.awt.Component.dispatchEventImpl(Component.java:3955)
        at java.awt.Container.dispatchEventImpl(Container.java:2024)
        at java.awt.Component.dispatchEvent(Component.java:3803)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212
)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3889)

        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
        at java.awt.Container.dispatchEventImpl(Container.java:2010)
        at java.awt.Window.dispatchEventImpl(Window.java:1774)
        at java.awt.Component.dispatchEvent(Component.java:3803)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:242)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:163)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)

        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)

        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 Thomas Preisler 2006-03-16 15:45:24 UTC
Confirmed. Will fix...
Comment 2 Thomas Preisler 2006-03-16 16:43:27 UTC
This is a windows only problem and yet another problem with / vs \.
Comment 3 Thomas Preisler 2006-03-16 16:47:44 UTC
FIxed. 'naturalizing' base and item path before converting to relative path.
Comment 4 Maria Tishkova 2007-10-31 15:59:29 UTC
verified
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo