My professor wants all assignments submitted as an archived folder and wants the program to be able to run on his Eclipse when he grades them. The program is a simple one with one folder that has to contain just one class with the main method.
I am using IntelliJ.
I followed Jetbrains faq on exporting files as Eclipse-compatible using Files --> Export : https://www.jetbrains.com/help/idea/exporting-an-intellij-idea-project-to-eclipse.html
It looks like the files were successfully converted as my folder directory looks similar to what the website. A screenshot of my directory after exporting: https://imgur.com/a/qQY4lUH
I am not sure what to do here as I am not familiar with the Eclipse ".classpath" and ".project" files that were created as well as the .eml and .iml files. I don't know what to do with them.
I was thinking of just copying them into a new folder called "ReviewNW" and archiving them and submitting that folder. I don't know if that would be enough for Eclipse to run my program. Is there something else I have to do from here?
Additional question: I have since changed some things in my program. Now when I try to use File --> Export, IntelliJ gives me an error and says I "cannot export files already exported to eclipse-compatible format". What if I make some changes to my class files in my src folder and need to export those changes again? I think I would need to manually delete each of those Eclipse files and export again or is there a simpler way?
Thank you!
I have an Eclipse RCP product.
I am (ab?)using the p2.inf file, located in the directory the .product file is located in, to remove the .exe file and rename the eclipsec.exe file to the .exe file. The content looks as follows:
instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/eclipsec.exe, target:${installFolder}/myproductname.exe, overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/eclipsec.exe);
I need to build this product for windows and linux with maven tycho. For windows the p2.inf file instructions work fine. For linux this fails, which I am not surprised about (there is no .exe file).
Is there a way to execute those instructions for windows only / ignore the p2.inf file for linux builds when the product is built with tycho (for linux just 1 executable is generated anyway)?
Thanks in advance.
Tycho version: 1.0.0
Eclipse SDK version: 4.7.0
This can be done either:
with a fragment that contains the p2.inf file and that has the Platform Filter: (osgi.os=linux) or
by defining an installation unit (IU) similar to the example described here that contains a line like units.0.filter=(osgi.os=linux). (see also Customizing Metadata in Eclipse help and in the Eclipse wiki)
If possible, the first option is preferable, since the second option is more complex and requires more knowledge about p2.
Note, your root problem seems to be Eclipse bug 185205. Maybe you'd like to vote for it or comment on it. I suspect there is a better workaround than do a copy via p2 for that.
I have to solve it myself, posting complete solution here using windows filter.
Create file p2.inf in the "Product" project of your application
(or feature project).
Change MYPRODUCT to your own branding name.
When copying make sure there are no trailing spaces after backslashes in touchpoint actions or it won't work.
#create a requirement on the fragment we are creating
requires.22.namespace=org.eclipse.equinox.p2.iu
requires.22.name=MYPRODUCT.eclipsecoverride.config.win32.win32.x86_64
requires.22.range=[$version$,$version$]
requires.22.greedy=true
requires.22.filter=(osgi.os=win32)
#create a IU fragment with touchpoint action
units.0.id = MYPRODUCT.eclipsecoverride.config.win32.win32.x86_64
units.0.version = $version$
units.0.provides.1.namespace=org.eclipse.equinox.p2.iu
units.0.provides.1.name=MYPRODUCT.eclipsecoverride.config.win32.win32.x86_64
units.0.provides.1.version=$version$
units.0.filter=(osgi.os=win32)
units.0.instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.copy(\
source:${installFolder}/eclipsec.exe,\
target:${installFolder}/MYPRODUCT_console.exe,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.remove(\
path:${installFolder}/eclipsec.exe);
How I moved eclipsec.exe to myproduct.exe (overwritten) without destroying the linux build
I added a myproduct.p2.inf file next to my myproduct.product file with the following content:
instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/eclipsec.exe, target:${installFolder}/myproduct.exe, overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/eclipsec.exe);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../../linux/gtk/x86_64/myproduct/myproduct.exe);
With this state the copy instruction will fail for Linux builds because there is no eclipsec.exe file (FileNotFoundException). It's generated for Windows builds only.
Note that the copy instruction fails if specified files are not found while the remove instruction simply isn't executed in case the specified file does not exist.
Workaround
To work around this problem I added the empty file org.example.feature/filesToCopy/eclipsec.exe to my feature (which is included in my feature based product) and added the line root.linux.gtk.x86_64=filesToCopy to the build.properties of the feature project. This copies the empty eclipsec.exe file to the Linux build.
What happens for Windows:
The product is built with eclipsec.exe and myproduct.exe
eclipsec.exe is copied to myproduct.exe (which overrides myproduct.exe)
eclipsec.exe is deleted
--> myproduct.exe is the only executable (next to the myproduct.ini file). All brandings are lost though!
What happens for Linux:
The product is built with the myproduct executable and an empty eclipsec.exe file.
eclipsec.exe is copied to myproduct.exe
eclipsec.exe is deleted
myproduct.exe is deleted too
--> The linux archive looks exactly as it was built by tycho. All the copying and renaming of *.exe files have no other purpose than making it possible to execute the copy instruction in the p2.inf file which is required for the Windows build.
I downloaded Notepad++ from https://notepad-plus-plus.org/repository/7.x/7.5.1/npp.7.5.1.Installer.x64.exe.
And I installed the same. Now I need to install few plugins, but in the menu option Plugins there are only Converter and MIME tools listed, but not Plugin Manager.
Edit: They have removed Plugin Manager with the version 7.5. Still it can be added by following #johnny 's instruction in the best solution.
P.S: The plugin manager is only supporting the 32-bit version.
As of Notepad++ version 7.5, plugin manager is no longer shipped with Notepad++
From the Notepad++ release notes:
You may notice that Plugin Manager plugin has been removed from the official distribution. The reason is Plugin Manager contains the advertising in its dialog. I hate Ads in applications, and I ensure you that there was no, and there will never be Ads in Notepad++.
A built-in Plugin Manager is in progress, and I will do my best to ship it with Notepad++ ASAP.
If the above doesn't put you off, and you want to proceed and install the plugin manager anyway, it looks like there's a GitHub repository for nppPluginManager - though I haven't personally used it, so cannot comment on it's validity.
The nppPluginManager installation instructions state:
To install the plugin manager, simply download (links below) the .zip, and place the PluginManager.dll file in the Notepad++ plugins directory, and the gpup.exe in the updater directory under your Notepad++ program directory. (e.g. "C:\Program Files\Notepad++\updater")
In fact, if you prefer, you can just add the PluginManager.dll to the plugins directory, then do a reinstall of Plugin Manager from the plugin itself, which will place the file in the right place! Of course, if you're already using an earlier version of the plugin manager, you'll be able to just update from the update tab (or when you get the notification that the update has happened).
The GitHub repository also contains the latest release.
Follow the steps given below:
Download Plugin Manager from here.
You can find the most updated version in the release section in the Git repository:
Extract the contents of zip file under "C:\Program Files\Notepad++"
Restart Notepad++
That's it !!
To install a plugin without Plugin Manager:
Download your plugin and extract contents in a folder. You will find a .dll file inside. Copy it.
Open C:\Program Files (x86)\Notepad++\pluginsand paste the .dll
Run Notepad++
You can download the latest Plugin Manager version PluginManager_latest_version_x64.zip.
Unzip the file.
Copy
PluginManager_latest_version_x64.zip\updater\gpup.exe
into
path-to-installed-notepad\notepad++\updater\
Copy
PluginManager_latest_version_x64.zip\plugins\PluginManager.dll
into
path-to-installed-notepad\notepad++\plugins\
Start or restart Notepad++.
Enjoy!
The way to install plugins seems to have changed, the previous answers here did not work for me.
The current (checked with 7.8.1) way to install plugins is to install it in a sub folder:
The plugin (in the DLL form) should be placed in the plugins subfolder of the Notepad++ Install Folder, under the subfolder with the same name of plugin binary name without file extension. For example, if the plugin you want to install named myAwesomePlugin.dll, you should install it with the following path: %PROGRAMFILES(x86)%\Notepad++\plugins\myAwesomePlugin\myAwesomePlugin.dll
from https://npp-user-manual.org/docs/plugins/
So PluginManager.dll goes into PluginManager sub folder.
Notepad v7.6 includes a Plugin Admin and from this you can install Plugin Manager(note1) but it doesn't work fine with npp v7.6(note2)
On the other hand Plugin Admin is only available on NPP "Setup version" and after following conditions
on Custom installation, "Plugin Admin" checkbox is enabled
on Choose Components "Don't use %APPDATA%" checkbox is disabled
Plugin Admin will place plugins at C:\ProgramData\Notepad++\plugins
(note1)Installation from Plugin Admin is not complete and \updater\gpup.exe is missing
(note2) Plugin manager is not using new plugins path and folder structure; from version 7.6 npp Plugins will be stored in individual folders (having same name than file.dll)
If you want to use npp7.6 portable, you can copy updater folder from Setup version, copy plugins from Setup version, or copy Plugins from npp v<7.6 and place each one in a individual folder.
Latest version of Notepad++ got a new built-in plugin manager which works nicely.
My system was 32 bit. I removed and re-installed Notepad++. After that from below got PluginManager_v1.4.12_UNI.zip and extracted it.
https://github.com/bruderstein/nppPluginManager/releases
I created a folder called PluginManager at C:\Program Files (x86)\Notepad++\plugins\ and copied PluginManager.dll into it. I restarted my notepad++ and now I see Plugin Manager.
A direct process to install / configure Plugin Manager :
Download the latest version of NotepadPlus Plugin Manager from the
official Github handle.
Extract the zip file.
Copy the pluginmanager.dll file and paste in C:\Program Files\Notepad++\Plugins\PluginManager directory.
Restart the Notepad++
Note: Create the
PluginManager directory if it is not present.
Notepad++ v8.1.2 has it where it used to be
I changed the plugin folder name. Restart Notepad ++
It works now, a
It can be installed with one command for N++ installer version:
choco install notepadplusplus-nppPluginManager
I want to figure out how can I put a file in the root folder of the project and use it in run time, there it will be accessible.
The problem that I have by doing that (placing the file in the root folder)-is that by default it means:
It is not in the classpath of the project.
It is not copied to the bin (output) folder.
I can’t see how my modifications of the file will affect the run process.
As I know there is a similar mechanism in eclipse that does the same:
The Plugin development project has a file-"plugin.xml" in the root folder of the project.
When you make a change in the file without building the project or copying it to the bin folder the changes take place when you run it.
example:
add an extension point in ”plugin.xml” and hit “RUN”, it will take place immediately.
Does anybody have an idea how this mechanism works in eclipse?
Edit - for clarification :
I am interested in how the launcher of eclipse Plugin development project loads\handles the "plugin.xml" file.
I assume when you say you want to put a file in a "root folder of the project" you are refering to a plugin that you are developing and then in runtime you want to get access to that file. Please don't vote me down if I did not understand that question correctly but based on my understanding here are some steps to follow:
Open your MANIFEST.MF file /MANIFEST.MF, this will oepn a multipage editor.
Click on the build tab (third from right).
This is where you specify what resources in your plugin you want the builder to include in the plugin at runtime. You will notice that plugin.xml is already checked which is why extensions get updated each time.
Check the resource on this editor page for the resource you want to be able to load and access at runtime. Behind the scenes this is updating your build.xml which the internal builder uses to figure out what sources to build/add when building/exporting the plugin.
One you have done that this is how you can get access to that file, you get the Bundle for your plugin and call the getEntryMethod with the path to your file and then open in inputstream from there you can load it as a File or whatever you want. Code example below: Hope this helps - Duncan
Bundle myBundle = Platform.getBundle("com.mycompany.myplugin.id")
InputStream in = myBundle.getEntry("/myfile.txt").openStream();
I'm using CDT plugin for eclipse for C/C+ development. But i'm not able to compile code it shows following error LINK : fatal error LNK1104: cannot open file 'C:\Program.obj'
What could be reasons?
One workaround would be to make sure to get your sources and generate your object files in a path with no space (not like "C:\Program Files (x86)\...")
The other workaround would be to check in the settings of the project if you can add double-quotes around any path defined. Check also the content of the .project file itself.