Can't get this plugin to work

  16 posts   Feedicon  
Replies: 15 - Last Post: October 15, 2010 19:29
by: Tutuianu Aurelian
showing 1 - 16 of 16
 
Posted: May 25, 2010 20:00 by duckpuppy
I've installed version 1.05 of this plugin, but it doesn't seem to actually work. I have right-clicked on a project that I have checked out from perforce and chosen "Manage with Perforce" and chosen the connection that matches the client spec for that project. The only options I have for any files in that project are "Refresh", both "Get Latest" options, "Add", and "File History" - no way to check the files out for edit or otherwise work on them. It's like the plugin thinks that none of my files are in perforce. If I look at the Perforce output window in Netbeans, it looks like the plugin is working properly, or at least returning sane results when it check my have list, etc. If I attempt to use the "Add" command, the perforce output window shows that it attempts to add the file to perforce and perforce returns a "Can't add existing file to depot" error, since that file is actually already in perforce, so it looks like the connection to perforce is working correctly.

Any ideas on what might be wrong?
 
Posted: May 25, 2010 21:12 by Tutuianu Aurelian
Hi duckpuppy,

First some quick questions:
- What version of netbeans do you use?
- Did you have installed a previously version of PerforceNB before?
- Your project folder is located under the perforce client root folder (there is a known bug with that, I am working on this right these days)?
 
Posted: May 25, 2010 21:53 by duckpuppy
Answers:
Netbeans 6.8
I upgraded from 1.04 to 1.05 - both exibited the same problem
My project folder is under the client root folder
 
Posted: May 25, 2010 23:30 by Tutuianu Aurelian
OK. Let's try to clean-up the plugin generated files.
1. Shutdown the NetBeans IDE
2. Find the folder with setting of netbeans. On Linux should be something like ~/.netbeans/6.8. On Windows probably on Users or Document and Settings on your profile. You should locate .netbeans/6.8
3. Delete p4nb_cache folder from that root folder
4. Delete config/preferences/org/perforcenb.properties file
5. Start IDE and define again the connection and fire Manage by perforce event on project root folder

Another tip (make sure you have toggled the option View -> Show Versioning Labels from main menu.

PS: thanks for your patience. I hope I will help you to use it, because I use it every day with no problems.
 
Posted: May 26, 2010 16:39 by duckpuppy
After performing the steps in your post, I still have the same results.

Also, there's no visible change to the project list when I activate "View/Versioning Labels".
 
Posted: May 26, 2010 20:00 by Tutuianu Aurelian
Hi duckpuppy,

Let's try something else. Action the menu Windows -> Versioning -> Perforce -> Cache View.
That window is for debugging, to see what information about files have the plugin.
Action the Refresh button, and select the project from perforce in the combo box.
Take a look on the list an tell me what do you have there?
 
Posted: May 27, 2010 18:47 by duckpuppy
OK

This is a newly created small project that's under the perforce client root and added to perforce already. Since we use Maven, we don't necessarily open the entire project tree at once, just the project we're working on.

There's only one file in this project, a pom.xml

(have to sanitize the product names in the paths below, sorry - silly work rule)
The client root is c:\p4ws, the project folder is c:\p4ws\trunk\xxx\yyy

The Cache View window shows the following:
c:\p4ws\trunk\xxx\yyy #0/0 [UNMANAGED]
c:\p4ws\trunk\xxx\yyy\pom.xml #1/1 [UPDATED]
 
Posted: May 30, 2010 20:07 by Tutuianu Aurelian
Well, I slightly feel that I begun to be short in ammo. The cache looks very fine, like it should be, so I suspect NB has a problem, not the plugin.

One more try.

I know that for 6.8 NetBeans has a not so friendly bug. To show version labels for files you should action View -> Show Versioning Labels. This menu must be on. Th bug I am talking about is that sometimes, you the effect is not immediate.
You should turn on that menu, and turn off after that, and turn on again. (Something in Microsoft style Smile ) This way you should force NetBeans to show proper labels and icons for Explorer items.

Please, can you try this too? I hope that is the case for you.
 
Posted: June 21, 2010 15:51 by duckpuppy
Sorry for the delay, and thanks for all of your help. I've even gotten a new laptop at this point, installed a fresh copy of NB6.8, and the plugin still doesn't work. I've tried toggling "View / Show Versioning Labels" multiple times and nothing changes... it still only lets me try to mark files for add even if they already are.

I will keep an eye on this project, though, and if it reaches a better level of workability I would love to try again. For now it looks like I'm back to using the command line or p4v.

If there's anything else to try (or a build for 6.9 that might change things - I'm upgrading to 6.9 today), I'm still willing to try it.
 
Posted: June 22, 2010 09:11 by Tutuianu Aurelian
No problem with the delay.
For the moment I run out of ideas. I had in plan to build soon a new version for 6.9. In the meantime I will reconsider your case and I will try to simulate your problem. By the end of the week I hope I will solve that and release the new version.
Many many thanks for your patience. I am very disappointed that I could not make it work for you, but I will push harder to make it work. Sorry for problems. I work alone on that project in my spare time, and that time is very short from various reasons. That's why is not fully tested. I hope sometime I will find other guys to contribute and improve this plugin. NetBeans deserves that.
 
Posted: August 03, 2010 18:23 by drampulla
I was just wondering if there was any update to this. I am seeing the same behavior. When I run under NB6.9 and use PerforceNB 1.0.5.1 my menu options are to "add", but I cannot "checkout" a file. Incidentally I can actually see the file history and it appears to be sync'ing properly, but I cannot checkout and the project window does not seem to be color coding the files properly to indicate that they are checked out.
 
Posted: October 13, 2010 22:06 by duckpuppy
I've just tried again with a fresh install of NB 6.9.1 and 1.0.5.1 and still have the same problem as well.

At least the problem seems to be repeatable now, with someone else experiencing the same problem.
 
Posted: October 14, 2010 21:01 by duckpuppy
I think I may have found the problem, but I don't feel qualified to fix it. Here's what I've done:
I've downloaded the current source and debugged into it. I placed a breakpoint in DeleteAction in the isEnabled() function. Digging into the calls there leads to
containsStatus(Project project, Set<File> files, List<FileStatus> includeStatus)

in FileStatusCache, which contains the line
FileInformation fi = getStatusMap(project).get(contextFile.getAbsolutePath());


This was returning null. It took me a while (and several new watch expressions) to see why - it's a CASE SENSITIVITY issue. "contextFile.getAbsolutePath()" was set to "C:\p4ws\tools\maven\assembly-descriptors\src\main\resources\assemblies\izpack.xml" and the key inside the hash returned by the getStatusMap() call was "c:\p4ws\tools\maven\assembly-descriptors\src\main\resources\assemblies\izpack.xml" - note the drive letter. It's capitalized in one and not in the other. So, the trick is to make sure the keys in the map can be retrieved in a case-insensitive manner.
 
Posted: October 14, 2010 21:07 by duckpuppy
I've submitted this as a bug:
http://kenai.com/jira/browse/PERFORCENB-11
 
Posted: October 14, 2010 23:49 by sjnewbold
I am having the same issues so I think I see the problem. In Client.java the method getLocalFile(IFileSpec) converts a Perforce file spec to a local file.
It replaces //<p4client name> with the root for the client. My P4 client root is "c:\....." with a lower case "c". This is what is put into the cache map as the key. Netbeans file nodes use the "C:\" convention. I think the solution is to edit your Workspace in
P4win to set your ROOT: to start with a capital "C".

This is my best guess. I can't change my Workspace root becuase I have a bunch of files that I can't submit at the moment, and P4 will not let me change the ROOT with out submitting open changelists.

Shannon
 
Posted: October 15, 2010 19:29 by Tutuianu Aurelian
It should be solved with 1.0.5.2
showing 1 - 16 of 16
Replies: 15 - Last Post: October 15, 2010 19:29
by: Tutuianu Aurelian
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close