workspace

How to convert from File to IFile in java, for files outside the project?

*爱你&永不变心* 提交于 2019-12-20 10:24:16
问题 Normally, this code is used for converting from File to IFile : IWorkspace workspace= ResourcesPlugin.getWorkspace(); IPath location= Path.fromOSString(file.getAbsolutePath()); IFile ifile= workspace.getRoot().getFileForLocation(location); But this only works for java files within the project. How can I get the IFile when File file is not in the workspace (not in the project)? 回答1: IResource and its child IFile were originally meant to be used only for resources located in the workspace. See

What is the best Emacs workspaces plugin?

≯℡__Kan透↙ 提交于 2019-12-20 09:56:06
问题 By workspace, I mean - I need to save the state of my open buffers (possibly in a user specified workspace file) and quickly switch to another set of open buffers, e.g. to continue working on files related to another project. Is there an Emacs plugin which allows this? Which one would you recommend? 回答1: I use a combination of save-visited-files and workgroups. In fact, workgroups will probably do most of what you want by itself. My config: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

which eclipse project/workspace files should be added to source control?

戏子无情 提交于 2019-12-20 09:00:52
问题 I want to share an eclipse project with the rest of my team through SVN. Which files should I add to subversion? In the workspace, there are many files which IMHO are not supposed to be on source control - they are a few megabytes in size. When adding just the project, another user who checks out the code still has to import the project into the workspace. Edit: maybe the correct question here, is how can I share my eclipse workspace using subversion? 回答1: With Eclipse, you always have to

How to update TFS workspace after computer name changes?

笑着哭i 提交于 2019-12-20 08:28:00
问题 I renamed my computer name, and now my TFS workspace is broken in Visual Studio 2012. When I type: tf workspaces /computer:ABOTONJIC-PC /owner:* /format:detailed Workspace : ABOTONJIC-PC Owner : wrongowner@test.com Computer : ABOTONJIC-PC Comment : Collection : netuse.visualstudio.com\DefaultCollection Permissions: Private Location : Local File Time : Current But I need to have : Owner : realowner@test.com Computer : NEW-PC Then I try: tf workspaces /updateComputerName:ABOTONJIC-PC

How do I have more than one workspace with Mercurial (hg)?

本小妞迷上赌 提交于 2019-12-20 07:07:31
问题 I am just trying to my head round Mercurial, so this may be a daft question.. Open I wish to have more than one version of a program compiled on my machine, for example, I may need to single step both the “working versions” and the “bracken” version in a debugger until I find way the behave differently. I also like to checkout to a clean workspace after I have done a check, so I can check (by doing a build) that I have not forgot to add a file. This is easy to do in most source code control

How can I config workspace in chrome?

旧街凉风 提交于 2019-12-20 04:08:10
问题 I'm trying to activate workspace tool for my local project. I want to apply CSS changes on my codes when I edit them into browser. I've added my folder, perfix url and path of my project to the Chrome like this: But still there isn't any change in my codes when I change it into browser, What's wrong? 回答1: Here are the steps to map a local workspace to a server path, using my example: Click "Add folder" in the Workspace settings, and navigate to your working directory. Click "Allow" in the bar

Read .txt file from workspace groovy script in Jenkins

こ雲淡風輕ζ 提交于 2019-12-19 05:07:05
问题 I am new to Jenkins and to groovy scripting, I want to read a .txt file which is located in the workspace of one of the jobs. I am trying to do this way: myfile = Jenkins.instance.getJob('JobName').workspace.readFileFromWorkspace('file.txt'); But leads to the following error: groovy.lang.MissingMethodException: No signature of method: hudson.FilePath.readFileFromWorkspace() is applicable for argument types: (java.lang.String) values: [file.txt] 回答1: Try this: file = new File("${Jenkins

Eclipse - “Workspace in use or cannot be created, chose a different one.” [duplicate]

南笙酒味 提交于 2019-12-18 09:57:11
问题 This question already has answers here : Eclipse says: “Workspace in use or cannot be created, chose a different one.” How do I unlock a workspace? (22 answers) Closed 3 years ago . I'm trying to create a workspace in the /Users/Shared/ directory with the thought that I can share that workspace between users. The problem is that after I create the workspace and change the permission on it, I encounter the error below (image) without even switching to a different user. I changed the

Erros in trying to synchronize Eclipse workspace files across a Windows machine and an Ubuntu machine; which files must or must not be included?

走远了吗. 提交于 2019-12-18 07:07:04
问题 I have been developing an Android app on a Windows machine. Now I would like to continue development on another Ubuntu 10.04 LTS machine. I would like to move between computers maintaining a recent copy of the project files on each computer. I am using SpiderOak to create a synchronization of the workspace directories of Eclipse which I am using for development. When the files were copied from the Windows machine onto the Ubuntu machine and I ran Eclipse, an error was presented that the path

Programmatically list open projects in an eclipse workspace from outside of eclipse

半城伤御伤魂 提交于 2019-12-17 20:05:04
问题 I want to write a Gradle plugin which can inspect an eclipse workspace directory and iterate over the open projects within the workspace and determine the location of each. Something like Workspace workspace = EclipseUtils.parseWorkspace("c:/myEclipseWorkspace"); Collection<Project> projects = workspace.getProjects(); for (Project project : projects) { System.out.println(String.format("name=%s, location=%s, open=%s", project.getName(), project.getLocation(), project.isOpen())); } I've looked