I am using the Eclipse RCP for Developers to create a version of the Workbench that's specialized to the development we do at work. Most of this has already been done, but I am fine-tuning now.
To initialize a project, users have to create a "preferences" file, which contains various settings. These settings include the "paths" for the code/files they want the project to load. Until now, users have had to nest all relevant code/files in the directory that contains the preferences file, like so:
./folder/file.prefs
./folder/nestedFolder/
./folder/nestedFolder2
(And so on.)
However, I'd like for users to be able to provide relative paths for folders/files not in the home directory, like so:
../../randomFolder/
The only problem I've seen (this works fine for integrating the code/file itself) is getting it to "show up" in the package explorer tool. To do this, you have to create a linked resource (as I already wrote code to do, for nested directories).
However, when I try to link to non-nested folders, I get this error:
ResourceException: Could not created linked resource {path}. Parent resource not accessible.
My code looks like this:
for (String path: FolderPaths) {
IFolder folder = project.getFolder(path)
if (!folder.exists()) {
folder.createLink(pathBase.append(path), IResource.FOLDER, nullProgressMonitor)
}
}
"pathBase" is an "IPath" pointing to the home directory's full-path.
Note that even if the FolderPath "path" is relative to the original prefs file:
../test/folder
Creating an IFolder with the "project.getFolder(path)" method changes it to:
/test/folder
Presumably, this is because the "workspace" is now attempting to create a project folder in the local directory, then link that folder to the path I pass in; this has always worked in the past, but now I get the error above.
Related
If I use vscode to open a directory and then opened some files and quit, vscode will reopen all the files at the next time when it launches.
But there is a problem. It seems vscode is not using relative path for storing this info and does not store this info inside the project directory. So if I move the directory or rename it, and then open the directory again, for example code projectNewName/, my previous session (opened files/opened editors) are lost. I have no idea where this session data stores and if it is possible to configure it to store relative path and save the session file inside the project directory, for example, project/.vscode or project/.vscode/session. If the opened editors session is stored inside a project directory, it will be restored regardless where the directory is and what the directory name is.
TL;DR: currently, configuration of this path is not supported.
VSCode stores the states for all the workspaces, in its global config folder under /Code/User/workspaceStorage/. See the path to the settings.json in this help paragraph for your OS and then just replace the end of the path. For Windows, for example, the settings path is %APPDATA%\Code\User\settings.json, so the state storage is
%APPDATA%/Code/User/workspaceStorage/
In this directory, there are many subdirectories with some hex names. Please, refer to my another answer for a python script to browse it. Each folder contains a workspace.json with mostly data only referring to the path of the workspace. There are also state.vscdb files in these directories. These are sqlite databases with only one table:
CREATE TABLE ItemTable (key TEXT UNIQUE ON CONFLICT REPLACE, value BLOB);
It is used as a key|value storage for all the state variables like:
workbench.panel.output|{"workbench.panel.output":{"collapsed":false,"isHidden":true}}
As far as I see from VSCode source, currently only a global path from the environment is used to locate this file:
this.environmentService.workspaceStorageHome
this.environmentService.globalStorageHome
which resolves to
get workspaceStorageHome(): URI { return URI.joinPath(this.appSettingsHome, 'workspaceStorage'); }
get globalStorageHome(): URI { return URI.joinPath(this.appSettingsHome, 'globalStorage'); }
So, it seems there are currently no options to customize it from the settings.json.
I'm programming a client side applications using SharePoint Designer 2013.
I want to change to VSCODE since it supports a lot of extensions for some Javascript library like angular, jQuery. And because of the Chrome/Node.js debugger extension.
But when I try to start any Debugger, I got the error:
Unable to create 'launch.json' file inside the '.vscode' folder (Error: UNKNOWN: unknown error, mkdir '\\servername\DavWWWRoot\sitename\Style Library\.vscode').
I get this error because it's impossible to create a folder in SharePoint where the name starts with dot.
So there's a possibility to change the name of this folder or the file location to any directory in my local computer?
No, it's not possible to move/rename that folder. VS code is a tool that bases project management on folder content. So it is essential that the project settings reside in the folder being managed.
You can move the "extensions" folder, but unfortunately not the argv.json (so the ".vscode" will, at least be recreated on vscode launch)
https://github.com/microsoft/vscode/issues/17691#issuecomment-559234574
I hope that'll finally change sometime .
https://github.com/microsoft/vscode/issues/3884
https://github.com/OmniSharp/omnisharp-roslyn/issues/953
I have the following folder structure in xcode for a project.
However, I have the above file structure in finder.
Is there any way to reflect the file structure from xcode to finder ?
I recently discovered a Command Line Tool that will do exactly what you need. You can find it here:
https://github.com/venmo/synx
To install the tool, you just need to open the terminal and run the following command (use sudo to run it as a superuser and get permission):
$ sudo gem install synx
Then, just like the instructions on the GitHub webpage above indicate, use the following command to re-organize your folder structure:
$ synx path/to/your/project.xcodeproj
This should do it :).
You should managed it yourself in Finder, then set new Path for folders in Utility View
The "folders" in Xcode are actually groups and not necessarily linked to a folder in Finder.
You need to manage it yourself if you want a mirror in Xcode/Finder.
What you can do is create the folder structure you desire in Finder, then drag each folder into Xcode, this will create references to the folders as groups in Xcode and any files you create in those groups will be saved in the appropriate Finder folders.
You can do this to some extent! There's just one extra step to do every time you create a new group (and this first time you'll have a lot of catching up to do!):
Xcode 3: Whenever you create a group in Xcode, immediately get info on it, and notice the "Path:" setting just below its name. Click "Choose..." and set it to a new folder with the same name.
Xcode 4: Whenever you create a group in Xcode, immediately select it and open the righthand sidebar. Notice the "Path:" setting just below its name. Click the icon next to "None" (what is that, a file in a window?) and set it to a new folder with the same name.
Now, whenever you add files to the group, they'll head to the corresponding folder on disk. Woo!
Hence, I always create folder in Finder and then add that in Xcode.
Check out this article. It might help you organise your project.
http://www.blackdogfoundry.com/blog/xcode4-folder-structure/
After version 9 Xcode (haven't checked previous versions) handles this for you! As long as you create a group and you don't select "New group without folder" Xcode automagically creates a corresponding folder in your project that will be reflected in your project's file structure.
I'm writing this Augmented Reality app for the iPhone and I'd decided to use ARToolKitPlus for it. Using QMake, I created the xcode project file and subsequently the libArToolKitPlus.dylib
I tried to compile and run the sample files "simple" and "multi" which worked well. Now all other attempts that I tried to create another project and use the library have failed due to header files not being found. If I drag the "include" folder to the xcode project I get 8 errors instead of just one; The one is for the main include not being found is solved but then it includes 8 other headers that cannot be found (although they are in the same folder)
#include "ARToolKitPlus/TrackerSingleMarkerImpl.h"
I get a error: ARToolKitPlus/TrackerSingleMarkerImpl.h: No such file or directory
If I drag the include folder then some of what I get:
error: ARToolKitPlus/TrackerSingleMarker.h: No such file or directory
error: ../src/TrackerSingleMarkerImpl.cpp: No such file or directory
error: expected class-name before ',' token
class TrackerSingleMarkerImpl : public TrackerSingleMarker, protected TrackerImpl<__PATTERN_SIZE_X,__PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS>
Having the dylib doesnt make a difference as far as I can tell. What do you think I should do?? Would creating a framework help??
I'm not sure its ok "copyright wise" to do so. But here's how to do it.
In XCode, create a new group called: ARToolKitPlus (or whatever u like).
Drag the "src" and "include" folders from the original ARToolKitPlus folder to the group you created.
Find the location of both the "include" and "src" folders by right clicking on each and selecting "Get Info"
Copy these paths in the "Get Info" window.
Open the project settings, choose "All configurations" and find "Header Search Paths", you can search for it directly.
Add the paths you copied from the info window to the header search paths, make sure you compensate for spaces (or even better, have no spaces in your paths).
Confirm and make it recursive, and voila!
I figured this out... It was an xcode problem, it was not including the "include" folder in the header search path. Did that manually and the problem was solved!
What I do: Publishing .Net 3.5 application via VS, or msbuild (whatever), and now I need to insert to the published application separate directory (Modules - not added as a reference to the project - our project architecture does not allow this). So I'm copying the folder to published location then runs mageUI.exe select the application manifest and then the problems starts. As I press the populate button it's adding also hidden directory? So I remove the directory, after I want to save the manifest file I get the
"Warning MSB3110: Assembly 'NAME.Shell.application.deploy' has mismatched identity 'NAME.Shell.application', expected file name: 'NAME.Shell.application.application'".
Did you have the same problems, according to http://smartclient.codeplex.com/Project/Download/FileDownload.aspx?DownloadId=5060 it should be easy as 1-2-3 but it's not.
On the irony side, I am currently updating the SCSF documentation for ClickOnce deployment for .NET 4.0, and now I know exactly what the problem it.
First, you want to publish to a disk location, not directly to the webserver. So do that, and then copy the dll's you want to add to the deployment into the version folder with the application manifest (.manifest). Rename them yourself -- just add .deploy on the end.
Bring up MageUI and open the application manifest in that folder, then uncheck the box that says "add .deploy to the file names". Click "populate".
Then remove the deployment manifest from the list; it's called something like appname.application. You don't want it to be included in the manifest's list of files.
Now you can save and sign the application manifest. Then without exiting mageUI, open the deployment manifest that is in the root folder (NOT the one in the version folder). Click on "Application Reference", then click Select Manifest. Dig down to the application manifest in the version folder that you just signed and select it. Then just save and sign the deployment manifest. It puts a relative path in there, so if you modify the .application file in the version folder, it won't work right when deployed.
Now take that .application file from the root folder and copy it into the version folder (replacing the one that's there) so you have the right copy for that version in case you need it later.
Now copy the whole shebang out to the webserver. it should work.
I think you are saying you need to add a folder of stuff to your ClickOnce deployment? What exactly are you adding? You say modules -- are they going to be compiled in, or is it something else?
If you want to add files to the deployment you have already created, you need to use MageUI to edit the application manifest, which is called something like appname.exe.manifest. (The appname.application is actually called the deployment manifest, which is confusing but true.) After adding the files, you will need to re-sign the deployment manifest as well (assuming you signed it in the first place).
It would be easier just to add what you want included to your project and re-publish. Depending on what it is, you can set the build action to 'content' (jpegs, html, etc) or 'none' (dll's) and then set "copy to output directory" to true, and it will include it in your deployment.
I'm not sure exactly what you are including. Give me more info, and I can provide more specific help.
RobinDotNet