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 51439 - Exception when clicking on .properties file in Files view.
Summary: Exception when clicking on .properties file in Files view.
Status: RESOLVED FIXED
Alias: None
Product: contrib
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-12 04:06 UTC by moizd
Modified: 2004-11-19 08:12 UTC (History)
2 users (show)

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 moizd 2004-11-12 04:06:59 UTC
Netbeans Beta2, Java 5, Win2K SP4.

I have .properties file which have
internationalized messages.
When I click on them in the files view and open
them, I get exceptions. They also, pop up as soon
as i move my mouse in the editor window. The files
are in source control.

org.netbeans.modules.vcscore.VcsFileSystem$FileLockUserQuestionException:
Do you wish to call edit command?
	at
org.netbeans.modules.vcscore.VcsFileSystem.lock(VcsFileSystem.java:3817)
	at
org.openide.filesystems.AbstractFileObject.lock(AbstractFileObject.java:198)
	at
org.netbeans.modules.masterfs.Delegate$FileLockImpl.lock(Delegate.java:282)
	at
org.netbeans.modules.masterfs.Delegate$FileLockImpl.access$200(Delegate.java:252)
	at
org.netbeans.modules.masterfs.Delegate.lock(Delegate.java:157)
	at
org.netbeans.modules.masterfs.MasterFileObject.lock(MasterFileObject.java:140)
	at
org.netbeans.modules.propagator.PropertiesModel.loadContents(PropertiesModel.java:195)
	at
org.netbeans.spi.navigator.ListModelSupport$Loader.run(ListModelSupport.java:911)
	at org.openide.util.Task.run(Task.java:136)
	at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:686)

java.lang.IndexOutOfBoundsException: Index: 0
	at
java.util.Collections$EmptyList.get(Collections.java:2968)
	at
org.netbeans.spi.navigator.ListModelSupport.getElementAt(ListModelSupport.java:551)
	at
javax.swing.plaf.basic.BasicListUI.updateLayoutState(BasicListUI.java:1133)
	at
javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(BasicListUI.java:1084)
	at
javax.swing.plaf.basic.BasicListUI.getPreferredSize(BasicListUI.java:353)
	at
javax.swing.JComponent.getPreferredSize(JComponent.java:1582)
	at
javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:769)
	at java.awt.Container.layout(Container.java:1401)
	at java.awt.Container.doLayout(Container.java:1390)
	at
java.awt.Container.validateTree(Container.java:1473)
	at
java.awt.Container.validateTree(Container.java:1480)
	at
java.awt.Container.validateTree(Container.java:1480)
	at
java.awt.Container.validateTree(Container.java:1480)
	at
java.awt.Container.validateTree(Container.java:1480)
	at
java.awt.Container.validateTree(Container.java:1480)
	at
java.awt.Container.validateTree(Container.java:1480)
	at
java.awt.Container.validateTree(Container.java:1480)
	at
java.awt.Container.validateTree(Container.java:1480)
	at
java.awt.Container.validateTree(Container.java:1480)
	at
java.awt.Container.validateTree(Container.java:1480)
	at
java.awt.Container.validateTree(Container.java:1480)
	at
java.awt.Container.validateTree(Container.java:1480)
	at java.awt.Container.validate(Container.java:1448)
	at
javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:379)
[catch] at
javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:113)
	at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at
java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.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 moizd 2004-11-12 04:09:04 UTC
Looking at the stack trace of the root exception, it may be due to the
Navigator module I have installed.
Comment 2 _ tboudreau 2004-11-12 06:25:38 UTC
It is due to Navigator;  but why is the VCS module throwing a UserQuestionException here?
Comment 3 moizd 2004-11-12 15:43:28 UTC
Maybe because the file is source controlled and read only? But i
wasn't doing any editing operations, simply clicked on the .properties
file node in the Files view.
Comment 4 Martin Entlicher 2004-11-15 09:45:34 UTC
UserQuestionException is an IOException. It's catched by Editor and a
dialog with the question is presented to the user.
UserQuestionException.confirm() is called when the reply is positive.
That will make the file writable.
Comment 5 moizd 2004-11-17 03:41:59 UTC
I got no dialog to edit the file and make it writable, just the
exception message
Comment 6 _ tboudreau 2004-11-19 08:04:57 UTC
I think it's probably because the propagator module tries to lock the file (perhaps I don't 
need to...). 
Comment 7 _ tboudreau 2004-11-19 08:12:13 UTC
Checking in propagator/src/org/netbeans/modules/propagator/PropertiesModel.java;
/cvs/contrib/navigator/propagator/src/org/netbeans/modules/propagator/
PropertiesModel.java,v  <--  PropertiesModel.java
new revision: 1.2; previous revision: 1.1
done