I'm trying to copy a single file from CVS into a new project that I created, but when you right click on the file in CVS it doens't have the option to check the file out. If I right click on a folder in CVS however, I can check out an entire folder to my project. How can I copy just a single file?
The folder-level "Check Out" action establishes linkage between the content of a local folder and the repository. You can then work in connected mode with change tracking etc. CVS tracks this linkage at folder level. It doesn't support single-file linkage.
Perhaps you don't care about this linkage and just want to retrieve a file from the repository. To do that, double-click on the file in the CVS Repositories view. Once the file opens in an editor, save it wherever you'd like.
cvs co <your_project>/path/to/file_you_are_interested_in
Related
I'm developing intellij plugin and I have tree structure with files and directories (not related to current project nor file systems). Is is just some virtual tree structure provided by rest service. I want to display it in ToolWindow with all common staff like colors, file type icons etc.
Is my usecase already supported by intellij?
Which classs support this?
The closes one related to my case I found trees from vcs package but it is commit / change related.
I don't think what you want to do is formally supported by JetBrains, but you could create a "fake" project in Intellij IDEA as long as the files and directories you want to appear in the tools (Project) window have a single parent directory.
I had a folder named "docs2" which contained some random notes and documentation files of various types such as txt, pdf, zip, html, js and bak. I opened that directory as a project in Intellij IDEA's Project window as follows:
Create an new project: File -> New -> Project... -> Static Web -> Static Web, then click the Next button:
On the next screen populate the Project location field by navigating to the folder containing the files you want to open in Itellij IDEA, and give the project a suitable name. Then click Finish.
After that Intellij IDEA will treat the directory as though it was a static web project.
Notes:
Intellij IDEA won't necessarily be able to handle all of the project files created in this manner. For example, when I opened a pdf file it was opened in another application, and when I tried to open a zip file nothing happened. But other known file types such as *.txt, *.html and *.js can be opened and edited as though they were files in a "real" project.
When you open the directory as a project Intellij IDEA will create some files in that directory: a *.iml project file and a .idea folder containing configuration files, so you will need write access to the folder that you open as a project.
I also tried opening the directory as an Empty Project in Intellij IDEA, but that only worked partially; files under the parent directory were shown, but for some reason it would not show any sub-directories in the project.
When looking at my project in the package explorer, there is a file called "Icon" in every Folder and package. The file is empty and has zero bites. Because of the large size of my project there are quite a lot of them that end up pushing files I want to access of the bottom of the screen, and being a general annoyance.
Why do these appear and is there any way to hide them?
Here is a picture:
If you are not created these files then these were created by some framework or tool/plugin used in your eclipse. Like VSS creates vss files and SVN .svn folder and files.
Check this post how to hide files from package explorer to know how to hide files in package explorer. But note that only hiding doesn't prevent these files from pushing.
To avoid/ignore pushing these file into git repo check this also refer this post GIT and pushing with ignored files
In intellij, my project is under SVN control, I have renamed and moved a file then I commited it.
How can I show log/history of this file after this commit with intellij.
"renames and moves are done as a delete followed by an add" via http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-rename.html
so this file lost its previous history.
If you know where this file was previously, right click on the directory which contains this file and in SVN context menu find something like 'show history'. It will show you all changes made in this directory, so you can find this specific file.
I find it. As the source file was rename, the subversion history will not show revisions with the old name.
To see old revisions before and after rename the file in intellij, right click subversion> compare with...
You can then compare the correct revision, with revision before rename the file.
I wanted to create .apk file from my Android project in Eclipse, so I klicked on File --> Export --> Export Android Application. I filled required fields and I clicked finish. After that I received an error and all my application files disappear, I only have a file called "gen [Generated Java Files] and I cant open it.
I tried to search my app files manually in Windows Explorer but all is gone...
Now I don't have app files and even .apk
Where is my application?
Try to look for it in your workspace directory.
If you don't know where that is, click File > Switch Workspace, and you'll be able to see the location.
Or you could go to:
\eclipse_directory\configuration\.settings\
Open org.eclipse.ui.ide.prefs with a text editor (e.g. Notepad).
Look for RECENT_WORKSPACES. You'll find the location of your workspace there.
Just use Free Recovery to recover your deleted file.
Try it soon before anything write on that disk sector.
Project is to create exe file. If we run exe file it will open one admin page (designed in Swing) that page contains browse button, max install, max install sys, and create build, while click the browse button we need to select one exe file from system and that file need to save it inside one folder of jar file. The maxinstall, max install sys value is stored in SQL lite database. This admin page will open for first time only,to get condition from admin. Next if we run the exe file it must check maxinstall and all parameter and then install that selected exe file.
My problem is, I created jar from my java program. While running the jar each time, the admin page only opening (i.e) the database file is not updated inside jar, but its works fine in eclipse. After that I need to create jar to exe.
..it is possible to extract jar in runtime,addfile in the extracted jar and create a new jar in runtime..?
Most JREs will place a file lock on the Jars. Therefore they cannot be updated while the JRE is running. Check a sub-directory of user.home for an altered version of the resource. If it is not found, use the one in the Jar. If it is altered, save the changed data to the sub-dir.
Use a sub-directory based on the package name of the main class, to help avoid overwriting the resources of another app. (or other apps. over-writing your resources).
I think that I understand your problem. Your application stores its state into its own jar file. the fact that you are using SQLite etc. does not matter. It works from Eclipse because in this case the class files and resources are not packaged into archive and your program changes files on file system easily.
The answer is: yes, you can change jar file programmatically. Jar is just a zip. You can use ZipInputStream, ZipOutputStream, JarInputStream, JarOutputStream to modify any zip including your own.
But it is very very not recommended for too many reasons. The right solution is to separate your data from your application. You have to store runtime data on file system, DB etc. For example you can create files in user home directory. It is platform independent. You can also use Preferences class that has portable implementations for all platforms.
Yet another reason to do this is your requirement to create exe. OK, you can change jar file but once you created exe file from your jar you cannot change it anymore.
Once an executable .jar is created it will be "locked". I you add more files to a locked .jar, those files will not be recognized internally by the .jar itself at runtime. So, the better approach is to extract your dependent .jar and then add it to a new, executible .jar containing the new file(s) that you need. Then moving forward you can run this new .jar.