How to create a mezzanine project in eclipse - eclipse

Our company used to use Eclipse for all kinds of python development. We can create PyDev, GAE, or Django projects, but how do we create a Mezzanine project in Eclipse? There seems very little document about it.

Miles Clark has answered this question over here. The releveant part is:
Working with eclipse/pydev (not aptana, but it should be very similar), I normally create the project outside of eclipse and import it. Roughly the steps are:
Create a virtualenv (I use virtualenvwrapper for this). I include system site packages because I've found it easiest to install python-imaging and psycopg2 through the Ubuntu package manager rather than in each virtualenv. I then install Mezzanine into the virtualenv, and create the project using the command line as described in the docs.
Once that's done, I'll create an interpreter entry in PyDev for the new virtualenv (Window > Preferences > PyDev > Interpreter - Python) and then import the project into eclipse. Normally, I'll setup the new project in git and then import the git repo, but you can import without that if you'd like. Choose pydev project, and make sure & choose the new interpreter that you created.
There's normally a little setup once the project's created in PyDev. Make sure the project is marked as a Django project, and then see "Project Source Folders" in Properties > PyDev - PYTHONPATH and the two settings in Properties > PyDev - Django.

Related

How to manage a C++ project with Subclipse?

I am developing a C++ app for Linux using Wind River Workbench 4, which uses Eclipse 4.5.2. I have installed Subclipse 1.12.
We maintain our projects in Subversion but previously haven't used Subclipse. Our workflow has been:
Create a new Workbench (CDT) project "in an external location" in
my svn workspace in C:\SVNProj\ (I'm working on Windows).
Save it
Import the project into my Eclipse workspace
(C:\WindRiver\workspace)
Add source files to the project as links to the files under C:\SVNProj\.
This worked fine, although remembering to use links was a bit of a pain.
Now I am wondering if the workflow would be easier using Subclipse. I guess that links are then no longer necessary, but I don't understand how that workflow works.
Do I end up with an svn workspace within the Eclipse workspace?
How would I import the existing project that I can see under C:\SVNProj\?
Do I just import the project directory or all of 'trunk'?
best regards
David
Try importing your project, but without copying into your workspace. Doing that will mean you edit in your SVN directory directly, presumably as you expect.

How to export Node.js and express Project in eclipse

I have some Node.js project using express frame work I am migrating to node eclipse, so I have to import some projects to eclipse.Can any one please suggest how to import express projects to Node Eclipse?
To import Node.js project into Eclipse
Since Nodeclipse 0.3.1 use File -> New Node Project and specify location of your existing project.
It will add just .project file. Yes, it is implemented not as would be expected.
Or just copy .project file to your existing project, change project name inside, and then File -> Import -> Existing Project into Workplace. (That however does not add settings like JSHint and JSDT configuration)
Check also built-in help or see it online https://github.com/Nodeclipse/nodeclipse-1/tree/master/org.nodeclipse.help/contents#intro
UPDATE: recommended is to run nodeclipse -p CLI tool. (Install with npm i -g nodeclipse)
Nodeclipse just adds IDE support for node js into eclipse. Since node js and express files are just javascript files that can be open in any text editor there is no migration. You just open the node js project in eclipse that's it.

Remove library from pythonpath

I checked out twisted source code form svn and opened it using eclipse as a Python project. But I also have twisted installed in my system under /usr/lib/python2.6/dist-packages. So the imports in the source code imports the installed version and not the version I checked out from svn.
How can I remove the installed version from the libraries that PyDev searches?
Removing /usr/lib/python2.6/dist-packages from PYTHONPATH is not an option because twisted depends on some of the libraries in that directory ( such as serial library )
When you make a launch in PyDev, it should add the PYTHONPATH of the project(s) before the PYTHONPATH of the interpreter, so, if you create a project with the twisted source code and set the PYTHONPATH (i.e.: source folder) for that project properly, it should find it before the one in the interpreter.
Note that other projects should reference the twisted project you configured in order to access it.

Setting up a cross-platform C++ project in Eclipse with cross-platform libraries

I am working on a cross-platform C++ project with 8 other people which uses the following libraries:
OpenCV Library
Boost C++ Library
The project is inteded to be cross-platform so all users have agreed not to use platform-specific code, and, to keep things as simple as possible, all users will be using Eclipse as their IDE. However, some will be using Eclipse for Windows while other will be using Eclipse for Linux.
Since the project will be hosted on SVN, we would like to avoid conflicts with different configuration files (like make files, eclipse project files etc..) which are shared. We would also like to share as much of the configuration files as possible through SVN, to keep the configuration as simple as possible.
Let's assume that all users have properly configured system variables and installed the required build tools (such as make, cmake etc.), and have configured their Eclipse settings configured properly (but not the project-specific settings).
How to configure the project once and what of the configuration files to share on the repository, so that both Windows and Linux users can compile it without modifying configuration files retrieved from the SVN repository?
(I am not looking for the complete solution which would specifically work for those 2 libraries I mentioned, so I would appreciate a general how-to step-by-step explanations which would enable me to easily add another library.)
General discussion:
You will need to install Cygwin or something similar to it to make GNU Autotools toolchain available to Eclipse on Windows:
How to deal with Eclipse CDT+Cygwin?
Once your toolchain, Eclipse, with CDT and SVN connectors are ready on your development machines, go through the following steps.
Open Eclipse and switch to CDT: Click Window->Open Perspective->Other... and select C/C++
Select: Eclipse->File->New->C++ Project
Project name: viewer
Select: Project type->GNU Autotools->Hello World C++ Autotools Project
Click: Next
Click: Finish
Right-click in Project Explorer: viewer->Reconfigure project
Click: Console->Display Selected Console submenu-># CDT Global Build Console. If "autoreconf -i" output is nominal, proceed to step 9. If Console reports: sh: autoreconf: command not found, then add the path to the autoreconf command to the Project Build Environment:
Right-click in Project Explorer: viewer->Properties->C/C++ Build->Environment->Add...
Name: PATH
Value: path_to_autoreconf:${env_var:PATH}
Click: OK
Click: Apply
Go back to step 8.
Double-click: Project Explorer->viewer->src->viewer.cpp
Add some code:
include <opencv/cv.h>
include <opencv/highgui.h>
include <cassert>
int main(int argc, char *argv[]) {
assert(argc > 1);
CvMat* img = cvLoadImageM(argv1);
cvNamedWindow("Picture", CV_WINDOW_AUTOSIZE);
cvShowImage("Picture", img);
cvWaitKey(0);
return 0;
}
Double-click: Project Explorer->viewer->configure.ac and enter the following code below AC_PROG_CXX.
AC_CHECK_LIB([opencv_core],[cvSetZero],[],[])
AC_CHECK_LIB([opencv_highgui],[cvShowImage],[],[])
AC_CHECK_LIB([boost_regex-mt],[regexecA],[BOOST_LIB_SUFFIX="-mt"],[BOOST_LIB_SUFFIX=""])
AC_SUBST(BOOST_LIB_SUFFIX)
Double-click: Project Explorer->viewer->src->Makefile.am and enter the following code.
>
bin_PROGRAMS=viewer
viewer_SOURCES=openCvFocusIssue.cpp
viewer_LDFLAGS = -lboost_regex#BOOST_LIB_SUFFIX# -lopencv_core -lopencv_highgui
Repeat step 8, autoreconf (Reconfigure project)
Click: Project Explorer->viewer
Build project by clicking the hammer in the toolbar. If you do not see the hammer, Window->Open Perspective->Other... and select C/C++. If C/C++ does not show up, install the CDT.
Click: Project Explorer->viewer and then Run->Run, then in the Run As window->Local C/C++ Application, then in the Launch Debug Configuration Selection window->gdb/mi and press enter. You should see Hello World.
Quit Eclipse and navigate to the viewer project directory.
On the command line, issue make dist
Ensure you got a viewer-1.0.tar.gz or similarly named file, and then remove it: rm viewer-1.0.tar.gz
On the command line, issue make clean
In the same place, issue make distclean.
Navigate to the workspace directory that contains the viewer project.
Move the entire viewer directory to the directory that contains the svn checkout you want to place the viewer project in.
Change directories to where you just moved the viewer.
svn add viewer && svn ci -m "Added eclipse-autotool project"
Open eclipse and make sure that you have an SVN connector installed.
Remove the "viewer" project from the Project Explorer view.
Open eclipse and add this SVN repository checkout to the Team perspective.
Import the viewer project from your SVN repository checkout.
Switch back to the C/C++ perspective and have fun.
Two suggestions:
Use cmake: I love this tool. There is a bit of a learning curve but
if you get it right all the project will include is the cmake files
and when a person first checks it out they run cmake to generate
their makefiles (or VC++ project files, etc) with all the different rules for linux or windows one
might need.
or
Check in a basic config for the project, then add those configs to the git/svn ignore so no one ever checks them in again, then when you checkout for the first time you have to get your config running but after that it won't be overwritten.

How to Run pinax inside eclipse?

i have been trying to running some pinax code inside pydev eclipse
i keep on having this error
Error: Can't import Pinax. Make sure you are in a virtual environment that has Pinax installed or create one with pinax-boot.py.
my question is how do i run pinax inside eclipse using django built in server
i am python newbie
Just follow this: http://pinaxproject.com/docs/0.7/install.html
make sure you set the virtual env right
First you install pinax and create a project as instructed at the site http://www.slideshare.net/davidpaccoud/introduction-pinax
Then create a django project in eclipse, after that import created pinax project into the djnago project in eclipse by clicking on File -> import. It'll ask for path of source(pinax project) and destination(eclipse project). Complete this process and you'll be able to handle your whole pinax project from eclipse.