I have a project made, but I had to copy and move the java source file to another location in our clear case. If I want that file to be changed when I make further changes how would I do that? It is now a new name so I will probably have to make a new project but I'm not sure how to just import that one source file into the new project or even the existing project.
Update:
I have a project with a package that has some classes in it. I moved the java source file somewhere else and now need to use that file in that location instead of the original. I created a new project and imported the source file. Now it doesn't recognize the package or the class. Its says class "example" is public, should be declared in a file named "example". And the package error says "incorrect package". I'm not sure how to fix this to where The project runs just like the other except uses the file from the other location, so it can stay updated
Click on the Projects tab to open up your projects. Right click the project you wish to import source code from and choose Properties down at the bottom. You will arrive at the Sources tab automatically.
Under Source Package Folders click the Add Folder button to add the folder containing your source. Once it's been added, you will see it appended in the table. You can then double click the row's text under the Label column to edit the way it appears in the browsing window.
Importing this way means that you don't need a new project just to include files from other places on your computer. You can simply browse for the files you wish to include!
Related
I'm developing a VR module in Unity that I hope to be able to import into any of my unity projects as an asset package. This package requires defining input from a Vive controller button to turn it on during gameplay. I would like to somehow share this actionset and button binding between projects so I don't have to manually create the actions and bindings each time I would like to use it.
Is there any way to share SteamVR input settings between projects? Specifically one whole input actionset, and its associated controller bindings.
I've tried exporting the SteamVR_Input folder as a package, also tried with including SteamVR folder, neither worked. After reimport, I can see the imported actionset in the project folder in the SteamVR_Input folder, but it isn't showing up in the input window (Window Menu -> SteamVr Input). However, the live input view shows the actions in the list, but doesn't register any button presses.
Update Unity 2019.2:
This seems to be fixed now.
In the source project, go to SteamVR Input window, click advanced.
Create a partial bindings folder. Rename it to what you want. Note that it will automatically add a SteamVR_ prefix. So my default name had SteamVR_SteamVR_ at the start. I needed to delete the suggested name and just name it my project's name.
It creates it in the base folder for your project, NOT the assets folder for some reason.
In Windows Explorer, drag it into Assets folder of source project.
In Unity editor (source project) it should now prompt you to import settings, but it detects that these actions already exist. Click Merge.
Make sure your actionset is still there in SteamVR input window.
Now you can export a unitypackage from this folder.
Now you can import the unitypackage in the destination project, and it should prompt you after import to load the actions! Yay.
Note: I ran into an issue if I renamed the partial bindings folder after creation. It would not recognize it as actions anymore and not prompt to import. To rename the partial bindings folder, you need to recreate it and follow the above steps again.
OLD ANSWER (outdated) :
Note: this answer is working based on a Beta version of the SteamVR plugin 2.2b4. It may change in a future release
Ok I got this working. It's still not quite possible as far as I can tell to create a unitypackage with the bindings and actions inside, but it's much better than before.
To move an ActionSet and bindings from project 1 to project 2:
In the first project: Create a new action set with your desired actions and bindings.
Go to Window Menu > SteamVR input
click Advanced settings, then click Create. This will create a folder in your project somewhere.
This is where the problem is. This folder can't seem to be packaged. BUT:
Important: In your 2nd project delete the SteamVR_Input folder (you may want to back it up just in case)
Drag this created folder from the 1st project (from windows explorer) into the Assets folder in the project view of the 2nd project (open in Unity). If you do this outside of unity it will not work.
It will prompt you to import the "partial bindings" and will add your custom ActionSet to this other project. Open Window Menu > SteamVR_Input in the 2nd project and then you should see your imported ActionSet at the top. Click "Save and Generate" to recreate a new SteamVR_Input Folder for this project.
Voila! It should work.
I haven't got it to be able to be packaged in an asset package yet.
After spending a lot of frustrating hours I discovered the following simple procedure.
(In Unity 2019.1.14f1 and I suspect it will work in higher versions as well).
In project 1:
It is crucial after editing your bindings in the SteamVR graphical interface to choose
Replace Default Binding
The result of this is that your bindings are completely saved in
Assets/StreamingAssets/SteamVR
(by default, but this is a perfectly good location)
This by the way, is also required if you want to use your bindings in a standalone build.
In project 2:
Copy, via the file system or via export and import custom package, the StreamingAssets/SteamVR folder from project 1 to the corresponding location in project 2.
As of that moment your bindings are available in project2!
I have copied my src package structure from eclipse to intellij and it makes this structure within src folder:
How do I make it dz1.drugi so I can one click expand all to my classes?
Another question is how to select default project folder as it is "workspace" at \Users\{Name} for eclipse. Right now, when I create new project like this:
it saves it without workspace (or projects folder) at \Users\{Name}.
Click on the cog icon at the top-right of the explorer view, and check the "Flatten packages" option.
That said, If you get used to keyboard shortcuts top open classes and files, and navigate through recently opened files, you'll quickly see that you'll amost never use the explorer view anymore.
Project view has an option to compact empty middle packages, enable it. You can also use Flatten packages option. Actually, your question is a duplicate of this one.
IntelliJ IDEA remembers the last location you've used when creating a new project. Once you want to create another project, the location one level upper of the previous project directory would be suggested. So, create a project in C:\Users\someuser\workspace\myproject1 and IDE will suggest C:\Users\someuser\workspace\myproject2 for your new myproject2.
Help me please. The problem I'm having is that in Eclipse In the Package Explorer, a Maven project that contains sub Maven projects displays duplicates of the same folders. In addition this causes the 'Ctrl + click' to not work.
So for example if you have a folder hierarchy, and almost each folder is another sub project, such as the following....
1/projectX-dev
2/projectX-dev/web-services
3/projectX-dev/web-services/mapping-data
4/projectX-dev/web-services/mapping-organizations
5/projectX-dev/web-services/metrixs
6/projectX-dev/web-services/metrixs/data-ingest
7/projectX-dev/web-services/metrixs/organization-feeds
Then in my package explorer I would have 7 listed items because each folder has its own .pom file. So for example expanding 5 it would contain the code that is also present in 6 & 7 because it is the parent folder which of course makes sense, but this is most annoying because now there are three locations where I can go to get at information where all I would want is for #1 to be displayed.
In addition to the layout annoyance, in Eclipse it seems that if I open a file under one of the listings over another then the 'Ctrl + click' to navigate to imported class methods no longer is supported. I am growing tired of this and need some clarification on how to just import the Maven projects and have it where the 'Ctrl + click' functions and the display in the Package Explorer would be 1/projectX-dev and that is it. I don't want all the other listings just the main parent folder.
As you can see in the image, the expanded folder netops-nice-jira-dev has items which are all listed at the top level as other projects. i.e. ui-extensions & web-services. The rest-service is a project also and it resides inside of the web-services project. So it is pissing me off how if I open a file from one location it allows for the proper interaction with the file such as Ctrl Click to track methods whereas with opening the file from another location it acts like a plain text file. 1 I don't want all these items to be duplicated in my view I just want the main top level project to be displayed and keep it simple to navigate down the structure rather than trying to find the proper place to open a file from.
Any suggestions on how to NOT display all the projects that are within the project?
The friggin previous people who put together this project created Eclipse projects within Eclipse project folders and everything was added to the Eclipse project view so things are all screwy.
If I open files from one project normal IDE functions will work, if I open the files from within one of the many other projects then the IDE functions don't work where i'm being told the project does not exist on the build path.
How frustrating!
Trying to add file to the project!
Right click on the subfolder and selected add file to projectName. I added file which are required into my project[Destination unChecked and selected folders Create groups for any added folders and selected Add to Targerts projectNameTest], and close the xcode and reopen! the file which are added to the project is not appear's. Then again right clicked on the project selected add file's from 'workspace' and add to project [repeated same scenario] And close the xcode still files are disappearing from my workspace.
each time i need to add the file again and again from the work space. When I close the Xcode.
what i need to do for this issue so When i Open Xcode the files need to be appears into my workspace
What i do generally when I need to add extra source files to my project is :
1. Drag the file from source to my project.
2. I add Tick mark to the "Copy items into destination group's folder (if needed)" option.
3. Now i can seed added file into my project.
Hope!! this helps.
If you want to add files with a CLI, as I do, since I use a remote mac for development, you can check XCodeControl at github. This method is much faster than licking somewhere, at least if you hung over ;)
I have a project with some missing files. The files are their own folder on the same level as the iOS app project folder. Not sure why but the files are showing up as "missing"
Is there something I can do to the Library Search Paths (see screenshot below) so they find them correctly?
fyi: I inherited the project, so it was just sent to me. I try to build it and get all those files missing.
thanks for any help :)
It's nothing to do with library search paths, they are used to find libraries to compile against; they're nothing to do with source files contained within your project.
They are missing because your project file is trying to reference a location for the file that doesn't exist. You have two options:
If you have all the missing files on hand in Finder, you can delete the references to them in Xcode, and re-import them. Do this by dragging them back into the project from Finder.
You can instead 'fix' your project file, to have it refer to the right place. To do this, use the File Inspector on the right, and under Location, select the 'box' icon (not sure what it is, but select it), and relocate your file.
open the folder in which these files are present then drag and drop the missing files in you project. check the "copy items into destination group's folder(if needed)", choose "create groups for any added folders".
Remove these files from the project view (list on the left side), drag them back into the project and make sure you don't select Copy to project, but you also have to check which target to put in.