I need help with adding C editor in RCP application. I add needed jars: org.eclipse.cdt.ui and org.eclipse.cdt.ui, in my build path. After this I can recognize class CEditor in plugin.xml -> Extension -> Extension Element Details -> class. I run my application, and when I try to open C file I get this message:
org.eclipse.core.runtime.CoreException: Plug-in "com.ivan.visualizer" was unable to instantiate class "org.eclipse.cdt.internal.ui.editor.CEditor".
Can someone help with this?
You must use the Require-Bundle in your plugin's MANIFEST.MF file to list all the plugins that your plugin uses. Trying to put plugin jars on the build path won't work.
You can set the Require-Bundle in the MANIFEST.MF editor on the 'Dependencies' tab in the 'Required Plugins' section.
Related
I had a RCP application that uses a plug-in project as dependency. I have added the plug-in project into MANIFEST.MF of my RCP program and it works well. But when I exported the program, it posted an error:
The build.properties is as follows:
output.. = bin/
bin.includes = META-INF/,\
.,\
Application.e4xmi,\
plugin.xml,\
com.hpi.hpdm.console.dependencies;bundle-version="1.0.0"
source.. = src/
source.. = src/
jars.compile.order = .
source.com.hpi.hpdm.console.dependencies;bundle-version="1.0.0"/ =
Comment: com.hpi.hpdm.console.dependencies is the plug-in project, com.hpi.hpdm.console is the main project.
I don't know what "\com.hpi.hpdm.console\"1.0.0"\=" does not exise! means. Any clues will be appreciated.
Updated:
The build.properties:
The .product file Contents tab:
When exporting an RCP your .product file must list every plugin (or feature) that is used by the RCP.
If you are using a feature based product configuration:
Open the feature.xml for your code and add all your plugins to the feature (in your case the feature is 'com.hpi.hpdm.console.feature').
If you are using a plugin based product configuration:
Open the .product file editor and switch to the 'Contents' tab. If your main plugin is listed there you should be able to use the 'Add Required' button to update the list. Make sure that all your plugins have been included (along with a lot of standard Eclipse plugins).
I need to know how I can properly add existing Java.class files to an Android Studio Project. My goal is to use these classes in an Android Project.
The Class Files are already written in Eclipse for another Java Project.
I've already tried File->New->New Module->selecting Java Library->Finish but that doesn't work properly.
As you probably all know it makes the MyClass Class by default.
For testing I imported com.example.* in my MainActivity and tried to build an Object of that Class inside the onCreate() Method.
The problem is it can't compile the Project. I got the following Errors:
Error:(7, 1) error: package com.example does not exist
Error:(16, 9) error: cannot find symbol class MyClass
Note: C:\Users\...\MainActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Error:Execution failed for task ':app:compileDebugJava'.
> Compilation failed; see the compiler error output for details.
Can anybody explain how to import my Java.class files correctly so that I can use them in my project?
You can add as a local library package to your project in Android Studio.
In android Project window, right click on app and select New -> Module.
In the Create New Module window, select Java Library and click next. Then give the module name, for example HttpClient in Library Name field. Then give Java package name as same as your existing package com.example.xxx. Then give one existing class file name AnyFileName in Java Class Name field.
Now new module is created with the name HttpClient and the package name is com.example.xxx. With an empty class file Anyfilename.java
Now copy all your .java files to the HttpClient folder created inside your android project. Now it would have overwritten the empty file Anyfilename.java also.
After copying all .java files would have automatically added to the library module.
And you will get 3rd build.gradle file for your module. Already you might be having 2 build.gradle for your android project.
In your app's build.gradle file, include local library dependency compile project(":HttpClient"). Now you can import java files in HttpClient module to android app's java files.
Note : Above information is given based on Android Studio 2.3.3
I'm trying to get Sublime Text 3 to work well with Cake's ctp (view) files. The syntax highlighting works fine out-of-the-box, but I can't get the HTML autocomplete to work.
If I open an .html file, I can get the tags and attributes to autocomplete (except in the attribute "style", it doesn't autocomplete CSS styles).
However, if I work on a .ctp file, autocomplete doesn't work at all. I've already tried changing the View->Syntax settings to both PHP and HTML and nothing... I've even tried using the "Open all with current extension as..." with no result.
I've tried using different plugins (ApplySyntax, cakephp plugins, etc) with any success.
Another thing I've noticed, also for javascript code, is that for "short" tags and functions, if I place the cursor at the opening tag or {, the closing tag or } gets automatically highlighted. However, if there's a bunch of lines of code in-between (same language) then the highlight won't happen...
Any help with these things would be really appreciated! I really want to like and use Sublime!
NO NEED FOR A PLUGIN NOW!
In the latest version of SublimeText 3 (at least), you can open a CTP file, then:
View -> Syntax -> Open all current extension as -> PHP
Then just close your open files, and when you re-open them, they'll be highlighted like the language you chose for that extension.
Just install the ApplySyntax plugin for sublime-text.
ApplySyntax can be installed in a variety of ways:
Through Package Control http://wbond.net/sublime_packages/package_control
Open Package Control
Select 'Install Package'
Find and select 'ApplySyntax'
By cloning this repository in Packages
cd into your Packages folder
git clone git://github.com/facelessuser/ApplySyntax.git .
By downloading the files and placing them in a directory under Packages, such as ApplySyntax or User
If you don't put the files in Packages/User (you can, but probably shouldn't), make sure they live in Packages/ApplySyntax. If you download and extract a compressed archive from GitHub, the directory will be facelessuser-ApplySyntax. Remove facelessuser-.
Courtesy for installation steps: https://github.com/facelessuser/ApplySyntax/blob/master/readme.md
N.B: I installed it and now the *.ctp files are displayed with proper syntax-highlighting for me.
Update:
In Sublime Text 3, you don't have to use the plugin, you can use the following solution:
https://stackoverflow.com/a/35297789/749232
I have a workspace project that includes an ExtJS app, Touch app, and a set of files that are shared between the two projects set up like this
WorkspaceFolder
ExtJSAppFolder
TouchAppFolder
SharedCodeFolder
I have the SharedCodeFolder referenced in the bootstrap loader and the ExtJS/Touch applications load in the browser fine
bootstrap.js
Ext.Loader.addClassPathMappings({
"ExtJSApp": "app",
"Ext": "../ext/src",
"Ext.rtl.EventObjectImpl": "../ext/src/rtl/EventObject.js",
'SharedCode': '../SharedCodeFolder/'
});
but when I try to use Sencha Cmd to build, it's giving me this error
[ERR] failed to find meta class definition for name
ExtJSApp.store.SharedCode.store.StoreFile
How do I tell Sencha Cmd to not append the ExtJS app namespace to the name of the SharedCode file? It should be looking for
SharedCode.store.StoreFile
not
ExtJSApp.store.SharedCode.store.StoreFile
You can add the SharedCodeFolder path to your workspace.classpath in the WorkspaceFolder/.sencha/workspace/sencha.cfg file:
workspace.classpath=${workspace.dir}/SharedCodeFolder
See here for more info:
http://docs.sencha.com/ext-js/4-2/#!/guide/command_workspace-section-7
Using Cmd 3.0.0.141, I have successfully generated a workspace and an Ext app in that workspace. The application builds correctly until I attempt to integrate the Bryntum Scheduler, where I encounter an error when I try to build:
"Failed to resolve dependency Sch.panel.SchedulerTree for file ExtCalendar.view.Tree"
the app is very simple at this point, uses Ext.application and follows the MVC pattern where I have a view defined "ExtCalendar.view.Tree" that extends 'Sch.panel.SchedulerTree". I also have models and stores that extend Bryntum classes as well, so I assume the compiler will trip over those as well, since it can't see the Sch namespace.
I've added a 'js' path to my app.json that points to the bryntum js file where 'Sch.panel.SchedulerTree' comes from. I've tried to run the 'refresh' command with the same results (Failed to resolve...). I've regenerated the bootstrap.js file manually using 'compile', but nothing from the Sch namespace ever gets added to it, despite the Brytum lib file being in the classpath.
What do I need to do in order to successfully run the 'build' command with libs like this?
Or, do I need to take a more granular approach using the 'compile' command?
With the help of the nice folks on the Sencha forums, I was able to resolve my build issues. The solution, for me, involved a shim. I added an external shim.js file to my index with as many //#require and //#define directives as needed in order to resolve the dependency issues.
According to the nice folks at Bryntum, once I upgrade from the free-trial version of the Bryntum Scheduler, I will be able to get rid of the shim and simply rely on the sencha.cfg classpath pointing at the Bryntum src.
Also, as an aside, the app.json file is not used in ExtJS apps, its inclusion in the generated files was a bug in build 141 of Cmd v3.
See this thread for more detail.