SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => SlickEdit® Core for Eclipse™ => Topic started by: davecazz on September 17, 2008, 11:46:33 pm

Title: files opened from file system or search list are not recognized as in workspace
Post by: davecazz on September 17, 2008, 11:46:33 pm
Hi, Here's another issue that just came up a few times. for some reason, if I open a file that is normally part of my workspace, from either the file system, open file dialog, or slickedit search panel, eclipse does not recognize it as part of my workspace and disables certain features (bookmarks, next/prev error)

Is there anyway to get around this?
Title: Re: files opened from file system or search list are not recognized as in workspace
Post by: davecazz on September 17, 2008, 11:49:24 pm
Also, it seems like if I open a file from the search panel which is read only because it's not checked out, then check it out from perforce, when I move back to slickedit, it doesnt try and reopen it from the filesystem so it thinks it is still read only.
Title: Re: files opened from file system or search list are not recognized as in worksp
Post by: Ryan on September 19, 2008, 08:39:51 pm
Not too much luck reproducing either of these...

Quote
Hi, Here's another issue that just came up a few times. for some reason, if I open a file that is normally part of my workspace, from either the file system, open file dialog, or slickedit search panel, eclipse does not recognize it as part of my workspace and disables certain features (bookmarks, next/prev error)

I tried opening workspace files from an explorer window, the Open dialog, and the SlickEdit Search view and it let me create bookmarks each time.  Any chance these files aren't actually in your workspace?  Or there is any more information you can give me about this one?

Quote
Also, it seems like if I open a file from the search panel which is read only because it's not checked out, then check it out from perforce, when I move back to slickedit, it doesnt try and reopen it from the filesystem so it thinks it is still read only.

I mimicked this by opening a read only file from the Search view and then going to a command prompt and setting the write permission bit.  When I switched back to Eclipse/SlickEdit it is now writable in the editor. 

Are you using Core 3.4.0?  I ask because since it seems like you are manually checking out your files with Perforce, when there is a pretty good Perforce plug-in out there (http://www.perforce.com/perforce/products/p4wsad.html), which Core integrates with very nicely.  It will automatically check out your files for you when you go to edit them and they aren't checked out.  This might solve this problem for you...are you using this plug-in?

- Ryan
Title: Re: files opened from file system or search list are not recognized as in workspace
Post by: davecazz on September 20, 2008, 07:31:03 pm
Thanks for checking into these for me. I am using 3.4.0, I looked at that plugin a while ago and didnt realize you could integrate it with slickedit, I thought you needed to use the perforce view to check out files. I will try this today.

About the opening files from search or the file system, I will check it again and see if I can reproduce it. the files are definately part of the workspace, I think I opened them by checking them out from perforce and then dragging them from perforce into the slickedit window. I will try and find better repro steps.
Title: Re: files opened from file system or search list are not recognized as in workspace
Post by: davecazz on September 20, 2008, 11:06:46 pm
I justed installed p4wsad and I see that it's views can connect to my depot, but I dont see any options for checking out a file from slickedit. when I try and modify a read only file, I see the change rw button, and then the version control setup, but the version control setup button only brings me to the normal slickedit options window, I dont see any panels for setting up version control. I also dont see any shortcuts for checking a file out.
Title: Re: files opened from file system or search list are not recognized as in worksp
Post by: Ryan on September 21, 2008, 11:15:27 am
You shouldn't have to do anything to have Eclipse check out the file automatically...there is an option that (I thought should be turned on by default) should take care of it for you.  It's under the Preferences for P4WSAD...but I'm not at work right now and I can't remember exactly what it is  :-\.

Basically once you have this option checked (and if you are using the latest version of Core) and you try to modify a read only file, you'll get about a 1 second pause as Eclipse is checking out the file, and then it will become writable.  You should not have to mess with the version control setup in SlickEdit at all. 
Title: Re: files opened from file system or search list are not recognized as in worksp
Post by: dancap on September 29, 2008, 09:55:30 pm
I'm also having trouble with automatic Perforce checkouts ... I am seeing the behavior described by davecazz. I am using 3.4 and have the P4WSAD plugin installed correctly. I can do manual checkouts, but the auto-checkout feature is not working, and I couldn't find the option in Preferences you had alluded to.
Title: Re: files opened from file system or search list are not recognized as in worksp
Post by: Ryan on September 29, 2008, 10:05:43 pm
"Enable support for Workbench edit, delete, rename, and refactoring operations" under Window > Preferences > Team > Perforce.

Does it not work when you use a normal Eclipse editor?  Or is that working fine?

- Ryan
Title: Re: files opened from file system or search list are not recognized as in worksp
Post by: dancap on September 29, 2008, 10:58:32 pm
Yes, that Preference option was checked by default. No luck using either SlickEdit or the default Eclipse editor.

I am running Eclipse through Flex Builder 3 if that makes a difference.
Title: Re: files opened from file system or search list are not recognized as in workspace
Post by: Ryan on September 29, 2008, 11:28:06 pm
If you can't get it working with the default Eclipse editor that's the first step...I have not tried that plug-in in conjunction with Flex Builder, but I can give it a go tomorrow when I get back to the office.

- Ryan

Title: Re: files opened from file system or search list are not recognized as in worksp
Post by: Ryan on September 30, 2008, 03:15:26 pm
P4WSAD seems to be working fine for me in Flex Builder 3.  Since you also aren't getting it to work even without the SlickEdit editor, I think something must be wrong with your project set up. 

This isn't really my area of expertise, but in whatever explorer view you use to view the structure of your project in Eclipse (Package Explorer, Flex Navigator, etc.), do you see the Perforce repository information in brackets next to the project name?  It should be like this: [Port;User;Client Workspace].

If you right-click on the project in this view, and select Properties > Perforce, is all the information there correct?

- Ryan
Title: Re: files opened from file system or search list are not recognized as in workspace
Post by: dancap on October 01, 2008, 12:20:21 am
I figured it out ... there was a step I was missing in my Flex Builder project setup. I needed to right-click on my project and select Team > Share Project > Perforce. Verify the repo information and click Ok.

Then the project is associated with Perforce and the repo information appears like you described. From there, auto-checkout starting working ... all Perforce related commands are accessed by right-clicking on a file in the explorer view and accessing the Team submenu.

Thanks for the help, much appreciated.
Title: Re: files opened from file system or search list are not recognized as in workspace
Post by: Ryan on October 01, 2008, 01:37:09 pm
Ah...glad you figured that out because that would've taken me a while to remember :). 

- Ryan