Unable to import module in Rascal project - module

I created a test project and added the following module as reference https://github.com/cwi-swat/rascal-OFG. But when I tried to check it using the terminal. I'm getting the following error.
|prompt:///|(0,32,<1,0>,<1,32>): Could not import module lang::ofg::ast::Java2OFG: can not find in search path
Advice: |http://tutor.rascal-mpl.org/Errors/Static/ModuleImport/ModuleImport.html|
Thanks in advance!

watch out for which project the terminal is active. If you:
first select the project your code is in, in the navigator by clicking on the project name
then start a Rascal console repl
you will see in the top of the console view the name of your project
this means the search path for the repl is set to the project and the interpret can find the files.

Related

How I can add new module to odoo 15

I am new to Odoo and I need to know what is the basic steps of adding a new module.
More specifically I need to know how to add custom modules to the addons-path.
In Odoo document they explain this step as this
$ ./odoo-bin --addons-path=../custom,../enterprise/,addons
but did not work for me.
For adding a new module you should do these steps:
Build your module with your written code or scaffold command.
Add the module path in your config file at addons-path = '',''
Change your URL like this: http://localhost:8091/web?debug=1
Go to apps and from up tabs
Select update app list and refresh your page.
Now you can see your module in the apps.
If you are not getting your custom module in Odoo after adding the path then you can try to add the full path of your folder into addons-path.
To get the full path of your custom folder just right-click on the folder and go to properties and find the path of your folder.
Also, you have to make sure to Apply the Update App list in your Odoo App Dashboard after restarting the server with custom addons.

how can i create project by chromium gn tools?

install depot_tool then following the gn guide and standalone guide, but i always get error "gn.py: Could not find checkout in any parent of the current path."
so my problem is :
how to create the gn project which is not using chromium sub project, eg: only one function like helloword?
how to create the gn project which is using chromium sub project like v8/pdfium, eg: one console project is using pdfium to read pdf page count.?
I'm not completely sure from the error you describe but it sounds like you don't have a .gn file in the root.
I recently started getting into gn and made a simple starter project: https://github.com/aellerton/experiment-learn-gn
The first thing I didn't expect was the need to have a root .gn file, and that the file needs to point to the root config: https://github.com/aellerton/experiment-learn-gn/blob/master/.gn
The second thing I didn't expect was the need to provide an entire toolchain. I kind of like this now as it gives me full power. I used this one here, by making it a git submodule as the author suggests: https://github.com/timniederhausen/gn-build
Then building a trivial Hello World console program was straightforward.

Setup golang environment using jetbrains

I have setup an golang developing envionemnt using idea (13.1 community edition).
It seems the SDK is recognized.
However, I could not create a GO file by right click the "New" under the source folder. (The item of "go" is grayed)
Currently I have to manually set the file extension to ".go" and edit the file, but autocomplete is OK.
This only exist on my Mac(with version 10.9.4)
I have set the GOPATH directory access mode to 777 but still not work.
This works fine on windows7.
So what should I do ?
This is what it looks like in windows
Thanks VonC, I already tried the /Users/Tom/go setting, this doesn't work and I switch to this root path.
here's my previous setting
macbook:home root# go env
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/mac/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"
And this is what is look like in the /Users/Tom/Go
Thanks VonC, however, this doesn't work. I am not sure what's the reason.
This is the envionment setting using GOCODE
This is several steps!
step1
By the way, I noticed that there are a difference from mac and windows when creating a new Go Project
at this step, the windows platform will show a "project sdk" while mac won't.
Make sure your IntelliJ project reference the right path within GOPATH.
From the plugin page:
If you have only one directory in the GOPATH and you are creating a project inside that path when you are working with packages that are part of the project you must still specify the whole import path for them, not the relative one. Example:
GOPATH is: /home/florin/go
the correct way to setup a project called demogo is: /home/florin/go/src/github.com/dlsniper/demogo/
new package is: /home/florin/go/src/github.com/dlsniper/demogo/newpack
the correct import statement is: github.com/dlsniper/demogo/newpack not newpack
Also make sure you have the latest version of the plugin, as issue 756 illustrates that IntelliJ IDEA 13 doesn't create the project directory structure on Mac OS X.
Finally, check if IDEA has correctly detected GOROOT and GOPATH:
See the page "Fix missing environment paths (Mac)".
The OP python adds in the comments:
If I have create a new Go project, this new feature is disabled.
If I create a new Java Command line App, then I could right click and add new Go file.
Right-click on either the top-level project or on the src directory and then go to Mark Directory As > Sources Root. After this you will be able to access the enabled Go context menus.

Can't import google_play_services-lib using eclipse

I re-installed google_play_services successfully and I have google_play_services-lib in my workspace. When I try to import it as a project in eclipse I use File-> Import->Existing Projects into Workspece -> Next -> Select root directory and then I find and select google_play_services-lib but finally it says "no project found to import". Why is that? How can I import this lib into eclipse?
I forgot to mention that I followed the steps at http://developer.android.com/google/play-services/setup.html
If I understand correctly then the reason you cannot import it is because you have already imported it. If the Google Play Services code is outside Eclipse and you have updated those directories then the job is done !
However if you copied the code into the Eclipse workspace then the easiest approach may be to delete the GPGS lib from Eclipse and then import again.
Had the same Problem. What I did:
File -> Import -> Android -> Existing Android Code Into Workspace
That worked for me.

Changing a project name

I have created an app for sphero.
The problem is that i started by opening the sphero sample program ButtonDrive and worked with that as a base. Now i want to change the name of the project and the apk.
I have tried right-clicking the project and renaming it that way, and for the main project that works, however when i run the project as an application unto my nexus 7 is just comes up and says:
" Unfortunately, Button Drive has stopped"
So why doesn't this work?
The tablet clearly thinks the project is still called Button Drive but where in the code do i have to change this to make it work?
or is it just not possible to change the name ?
When you right-clicked on the project in the project navigator did you click rename in the main dropdown, or did you click on "Rename Application Package" within the android tools sub-menu? You should be using the later option.
Also verify that the AndroidManifest.xml Label field is correct, or if it is pointing to a value in strings.xml within res/values verify that the application name is correct.