I have a PHP project in Eclipse (with the Aptana Plug-in) that I deploy to a number of different hosts using the 'Connections' Sync mechanism. The problem is that in addtion to all the common code each site's 'instance' of the project contains a host specific folder tree that can contain a large number of files. Each time I run 'sync' I have to manually check 'skip' for the host specific folder and all of its children.
Is there any way I can config sync to ignore this folder?
I've looked through the include/exclude filter stuff and various entries in Stackoverflow for 'exclude files/folders' but they all seem to relate only to repository syncs (GIT/SVN ...), validators, builders etc
jon
I hope this functionality exists in Eclipse with the Aptana Plug-in, I am using Aptana standalone.
I think the option you are looking for is called cloaking. You can set up name patterns for cloaking under Window > Preferences > Aptana Studio > Publishing. Here you can add file naming patterns to be excluded from all publishing - other projects will also ignore these file name patterns so use caution. I prefix files and folders with an underscore when I don't want them syncing and then just use _* in this preference.
Related
I am having a data set inside my Eclipse PyDev project that represents about 8 million single .json files. Apparently Eclipse PyDev tries to do something with those files. I'm not sure what Eclipse is doing but it definitely is doing something.
How can I tell Eclipse to leave those files alone and not try to index or parse it because it slowly kills my CPU?
Well, PyDev itself should do nothing with those files, but if there are other plugins (such as EGit) that could explain it...
Anyways, Eclipse itself will at the least index the resources by default.
A workaround here may be dealing with Resource filters: inside the PyDev Package explorer select the parent folder, Alt+Enter to see its properties (or right-click > properties) then select Resource > Resource Filters and add the filter to exclude those .json files.
Is it possible to checkout several directories into one project in Eclipse?
I have the following directory:
JS
app
css
icons
I want to check out js/app and js/css into one project.
I've been looking everywhere but can't seem to find an answer.
I don't think, it is possible. But you could checkout the whole directory, and ignore the icons directory. Depending on the language you are using and the perspective, there is sometimes the notion of a "source folder". You can then mark app and css as source folders (so they stand out in Eclipse and are clearly separated from the rest). Could you add the distro you are using (Standard Java, Java EE, ... )? And could you please add information to the subversion client you are using: Subversive, Subclipse, or svn cmd client or TortoiseSVN?
In Eclipse I have two maven projects A and B, where A is a parent for B. The directory structure is the following:
A/pom.xml
A/B/pom.xml
A/B/...
Then I use File search (Ctrl+H) to find any file in the project B. The search result window shows the file two times with different relative paths:
A/B/<my_file>
B/<my_file>
So, the same file is shown twice. Obviously, the first search result is reduntant. Is there a way to exclude these duplicate search results?
What I personally do to avoid this is marking each module in the parent project as derived (right-click on the folder > properties > Attributes: Derived).
Then when you perform a file search, uncheck "Consider derived resources" (I don't think it is checked by default) and you won't get the A/B/<my_file>.
The only inconvenience is that you must do this for each module, and each time a new module is added.
In an open resource window (cntrl+shift+R), click on the arrow on top-right and check "Filter Duplicated Resources". This worked for me.
Checking Window -> Preferences -> Maven -> Hide folders of physically nested modules (experimental) worked for me in Mars.1 Release (4.5.1).
After checking it I closed all projects within eclipse, deleted eclipse project files (.project, .classpath and .settings) and reimported my maven projects.
I had similar problem.
My solution for this problem was
Create eclipse "working set" of projects to search
Set this working set as option into search dialog
Search in it
Windows - Preferences - Maven - Hide folders of physically nested modules
I agree with Damon Horrell.
Go to Windows - Preferences - Maven - Hide folders of physically nested modules (make sure the checkbox is checked).
Note: Make sure to re-import the maven project into eclipse to see the changes.
Within the parent project, child ones were already visually hidden in my case, but still found through search and Ctrl-click links.
I solved this by using Resource filters:
Right-click (parent) project > Properties > Resource > Resource Filters
Click Add Filter..., select Applies to -> Folders and enter one child project's folder name, click OK
Repeat 2. for all child project folders
By the end, you should have something like this:
There is an ancient bug which requests Eclipse to support nested projects. Opened 2008, won't happen soon, I guess.
Since Eclipse doesn't support Maven's default nested module layout, you have to import each module individually which doesn't confuse Eclipse but it can confuse you as you can see in the search results. Similar things happen when you start to save launch configs in a module.
There are several possible solutions:
Get used to ignoring half the search results. Takes some discipline but no magic.
Make sure your root project doesn't contain anything important that you might want to open from Eclipse (i.e. move the parent POM to a new module which must be a child of the root project). Now you can close the root project.
Takes some discipline where to put things in your project and it's clumsy when you have to add new modules.
Use the flat multi-module approach. This is an extension to #2, it looks odd and there might be plugins that are offended by that. So if you use a lot of nonstandard plugins, you should check whether they like the new layout.
As a new joiner, still couldn't comment but I'd really like to add something to the best answer. It works! It not only removed the duplicate files for me (one from child module and one from parent module), it also removed the class files from parent module).
But it added the folder to my .gitignore which will cause problem for new files/directories added later. I just reverted the change to .gitignore and it still works in eclipse.
Find this answer to disable auto change of .gitignore
EGit and Eclipse modifies .gitignore file but it should not
You can solve this problem using a flat multi-module approach.
Caveats may apply if you're using the maven-release-plugin with a version control system other than Subversion.
In addition to "Hide folders of physically nested modules" mentioned, you could uncheck parent modules when importing Maven project:
All,
I have a 20 member dev team working on a development project.
To provide greater control we have created a workspace with necessary projects and configurations (like project preferences, set-ups etc) in IBM RAD.
The idea is to have the pre-configured project in subversion so that when the dev team members checkout the project they get a complete workspace, so that they do not have to configure setups them selves.
However the problem is everytime someone checks out the workspace IBM RAD will also edit the .metadata (and some other folders and properties file) folder that has been checked in.
Idea is the developer should not have to change anything except the source code folders or application specific files.
I think many other teams might have faced situations like this.
Can anybody provide the best practices/process/references on how this is done in development projects?
Thanks
I think svn ignore will solve your problem.
check http://svnbook.red-bean.com/en/1.1/ch07s02.html
The svn:ignore property contains a
list of file patterns which certain
Subversion operations will ignore.
Perhaps the most commonly used special
property, it works in conjunction with
the global-ignores run-time
configuration option (see the section
called “Config”) to filter unversioned
files and directories out of commands
svn status, svn add, and svn import.
You cannot stop IBM RAD from updating .metadata folder and Eclipse doesn't support splitting workspace folder as it does for the configuration folder.
The best solution would be to setup your build scripts to be able to setup your workspace based on some .zip file(s), where you've captured the required settings for the workspace. This will give the closest thing to automatic workspace setup without having to deal constantly with changed files in .svn.
how to create a general project only containing one folder in netbeans 6.9? In eclipse i can do it, but in netbeans sometime i just want to organize some files related to some category, so i want to create a single project just only containing folder and files, but now it seems that it's not possible.
if someone has the same problem, and can share your experience, thank u.
When I need to have access to a collection of files located in a folder or group of sub-folders, and I don't need much IDE support, then I add the top-level folder to the "Favorites" tab. From there I can open any file in an editor, and perform other file system commands that NetBeans makes available. If you are using a version control system supported by NetBeans with that collection of files, then those commands should be available to you too. What is not available are things like "Build" and "Debug", etc. (obviously).
If you cannot see the "Favorites" tab (it would be in with "Projects", "Files", "Services", etc.), then open the Window menu and click on Favorites.
As #lepe suggests, if your files all tend to be of a particular type, then you can create a project of that type, and then have access to the files on the "Projects" tab. Just ignore the "extra" stuff that NetBeans is giving you.
Finally, "Freeform" project types exist for certain types of projects, and Java also has an "Automatic" project type (if you install the appropriate plugin from the Update Center). These types of projects more closely resemble NetBeans-generated projects insofar as they are designed to be used with existing Ant build.xml scripts and whatnot (Automatic projects are a bit looser on that), but they still assume that the project is intended for builds, etc.
If you have a "generic" project that uses Ant to "do stuff" kind of like a build, then you might be able to subvert one of the "Freeform" project types, cajoling it into what you need.
In the end, I find just having the folder in "Favorites" works the best for me when I don't need all the extra stuff.
The benefit of Projects as opposed to Favorites is that each project remembers the files you had open when you last switched away from that project.
I use NetBeans just for editing web stuff (HTML, CSS and JavaScript files) within the context of a larger Java project (for which I use Eclipse). I use the PHP version of NetBeans, since it's the most light weight version that handles these web resources. To create a new NetBeans project for my existing Java web app I do: File > New Project > PHP > PHP Application with Existing Sources. On the next wizard screen, in "Sources Folder" browse for the folder that is the parent of all your web stuff (e.g. src/main/webapp). Leave all the other fields with their default values, just to humour NetBeans that we're dealing with a PHP project. Click Finish. No PHP specific stuff gets created. A "nbproject" folder is the only thing that gets created in your chosen folder. (There is the option of locating this outside of the project but I find it convenient to have it located with the project itself, and I just configure my source control system to ignore this folder.)