w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Can Eclipse IDE plug-ins extend other plug-ins
Is it possible to extend an eclipse plugin Yes. They are called Extension Points. However, the plugin being extended is what defines the extension points for pluggable functionality. You could also just simply make the WST plugin a dependency of your plugin.

Categories : Java

Installing AJDT I got a Plug-in org.eclipse.jdt.ui was unable to load class org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor
I've got the same error after upgrading to Win 8.1. In my case the %workspace%/.metadata/.plugins directory was suddenly write-protected. To remove the lock I had to rename the directory, create a new directory name .plugins and finally the contents from the renamed to the new directory.

Categories : Eclipse

How to write plug-ins for eclipse (CDT) using C++
In general, the best approach for developing plugins is to use a JVM language that can extend Java classes, implement Java interfaces, and instantiate and invoke methods in Java objects—notably Java. Once you have that, you could delegate parts of the implementation using whatever technology you wish, such as JNI, JNA, RMI, LuaJ, Jace etc. It would be no different for an Eclipse plugin than any other program. The problem being the degree to which the delegated code has to callback into the JVM to do it's job. In the trivial and near trivial cases, a plugin doesn't need any code but, obviously, it's contribution would be quite limited. One example is providing documentation. It all depends on what extension points it uses require. But, if all you want is a project Builder that does

Categories : C++

Plug-in for Eclipse that can zoom in
I don't know any plugin that can do that, you would be able to google it just like me. However you should realize that also the Eclipse Marketplace is a plugin, which first needs to be installed. It simply is not, in the Eclipse you get packaged with the Android SDK. You can go to Help -> Install new software and in the box where you type the URL, you can click the arrow to show a dropdown and it will have some pre-set links. One of them, is the standard link of your Eclipse version (should be Juno for you). Click that and let it load for a while. You'll get a load of plug-ins. Look for something like 'General purpose tools' and in that you can find the Market Place plugin. Once that is installed, it will be added in the Help menu.

Categories : Android

Eclipse e4 and plug-in development
I'm not sure what exactly you want to achieve. Option 1: You want to write a plug-in for an e4 RCP application: You can do this (e.g., contribute ViewParts to an e4 application model) via a model fragment. Basically, instead of extending the org.eclipse.ui.views extension point in Eclipse 3.x you create an application model fragment file in your plug-in and reference this in an extension to the extension point org.eclipse.e4.workbench.model. In the model fragment, you define the parts, commands, etc. you want to contribute. See for example these tutorials for more details: http://eclipsesource.com/blogs/2012/06/26/eclipse-4-e4-tutorial-part-3-extending-the-application-model/ http://www.vogella.com/articles/Eclipse4Modularity/article.html Option 2: You want to write a plug-in e4 s

Categories : Eclipse

Interactive console plug-in for eclipse
If you mean getting user input from the console view, you can use the Scanner class or the Console class. Code sample: Scanner reader = new Scanner(System.in); String userInput = reader.next(); Or Console console = System.console(); String userInput = console.readLine("Please input:");

Categories : Eclipse

Metro plug-in for Eclipse Juno
There is no Metro plug-in for Eclipse Juno, but GlassFish Tools for Juno available at Eclipse's marketplace. If you are willing to try it, there is an official tutorial for Metro-on-Eclipse available here. However, you have mentioned in the comment that you are not using Glassfish, but Tomcat, so I would recommend different approach. Follow this tutorial and be careful when deploying the service - you will have to edit web.xml and sun-jaxws.xml files, together with installing JAX-WS (or Metro) libraries on Tomcat.

Categories : Eclipse

Groovy-Eclipse plug in problems
Right click on the project -> Configure -> Convert to Groovy project. Are you sure this project is not a maven or gradle project? The src/main/groovy source folder implies one of those.

Categories : Eclipse

How to profile Eclipse plug-in startup time?
Eclipse has been OSGi-based since 3.0. Just use an SS console command in the OSGi console view to check the bundle(your plugin) status. See more here.

Categories : Eclipse

In the Plug-in spy in Eclipse, what information does the Active Help offer?
Those are the IDs of the available context help for the view that you investigate. So if you use the main menu Help -> Dynamic help while that compare editor is focused, one of those 2 topics will be shown in the Help view on the right side of the IDE. It may become a bit more clear if you use the Spy on a plugin manifest editor. There you will see help context ids for the plugin description page, the extensions page, the extension points page and so on.

Categories : Eclipse

Workaround to "allowThrowsTagsForSubclasses" issue in Eclipse Checkstyle Plug-in
You could allow subclass throws in Checkstyle: <module name="RedundantThrows"> <property name="allowSubclasses" value="true"/> </module> and change your method signature to: public void myMethod() throws SubclassOfMyException, MyException { Some may consider it bad code style, though.

Categories : Java

Install ColdFusion Builder 2 Update 1 Plug-in in Eclipse 4.3
According to the ColdFusion Builder System Requirements page one needs Eclipse 3.7.1. Having tried to install it on versions later than that, failing, and talking to Adobe about it, they confirmed that one needs that precise version. More recent ones won't do. This is a bit subpar on the part of Adobe, but so be it.

Categories : Misc

Eclipse plug-in to edit faces-config.xml file
No, but you can use the JBoss Developer Studio. There are more editors like VPE. Checkout some tutorials on Youtube: http://www.youtube.com/watch?v=OMtcjgTyP-g

Categories : Eclipse

How to initiate a specific method when developing a eclipse plug-in
I'd start by looking at the org.eclipse.jdt.core IJavaProject interface. You get instances of this class using the JavaCore class. These instances have indirect references to the IMethod instances you're looking for. An IProject is an IJavaProject and it has types in its classpathfragments and those types have methods... For your tool to really be usable, you'll need a way to choose the method you want to report on. For that I suggest you create a new Eclipse plugin project using the popup menu template. That will get you a menu item in the Package Explorer's context menu that can invoke your tool's logic on a method you've selected.

Categories : Java

Eclipse Plug-in Enable/Disable Menu Items Programatically
Add an IMenuListener that enables the context menu actions when the context menu is about to show: menuManager = new MenuManager(); menuManager.setRemoveAllWhenShown(true); menuManager.addMenuListener(new IMenuListener() { public void menuAboutToShow(IMenuManager m) { contextMenuAboutToShow(m); } }); ... And then: protected void contextMenuAboutToShow(IMenuManager m) { copyAction.setEnabled(copyAction.isEnabled()); menuManager.add(copyAction); ... }

Categories : Eclipse

How to find path of current selected project in eclipse plug-in
public static IProject getCurrentProject(){ ISelectionService selectionService = Workbench.getInstance().getActiveWorkbenchWindow().getSelectionService(); ISelection selection = selectionService.getSelection(); IProject project = null; if(selection instanceof IStructuredSelection) { Object element = ((IStructuredSelection)selection).getFirstElement(); if (element instanceof IResource) { project= ((IResource)element).getProject(); } else if (element instanceof PackageFragmentRootContainer) { IJavaProject jProject = ((PackageFragmentRootContainer)element).getJavaProject(); project = jProject.ge

Categories : Eclipse

Strategy for Understanding Eclipse bundles and plug-ins / Escape from dependency hell
You could try to add the binary jar to your local eclipse plugins directory. You can find it here.

Categories : Eclipse

Adding Facebook social plug-in automatically: "Like" or "Follow"
Pages that have a page name set can also be reached under www.facebook.com/name – so that’s no realistic way of distinguishing a user profile from a page. Your only option would be to make an API call and look for fields that are only available on pages, but not user profiles (or the other way around) – pages have f.e. category or is_published, whereas only a user profile would have f.e. a first_name.

Categories : Javascript

How to validate EditText in Fragments and prevent Fragment change?
You could not let them swipe until the TextField is filled with a boolean. In the swipe handler just add: if(filled1 && filled2) Have those by default set to false and then set true when data is added. You could also have it so that every time data is added to the TextFields, a String is set to the data in the TextField and disallow swipes unless both strings have a length longer than 0.

Categories : Android

Setting start levels & auto-start of Eclipse plug-ins: p2.inf vs product definition
It really comes down to a personal preference. The product level is the ultimate final artifact most of the time. As you discovered, it has much better tooling integration. When the product is assembled by Tycho or PDE Build you'll know exactly what's in it and what needs to be started for it in order to work properly. However, sometimes it doesn't feel right to go down to the bundle granularity level in product definitions especially when it's composed of features only. But defining start properties at the feature level or even at the bundle level can be tricky, though. For example, when someone consumes your features/bundles in another product they might have different auto-start/start-level requirements. FWIW, the p2.inf file isn't outdated at all. It's the raw bare metal to modify/op

Categories : Eclipse

Adding Fragments to a LinearLayout programmatically
If the container is a FrameLayout the nested Fragments are not doubled. That's potentially not true. It is more likely that the new fragments are just sitting on top of the old ones, effectively obscuring them. Hence, the underlying issue is probably the same, the visual effect is just different because of how the various ViewGroup implementations arrange their children. That being said, there is an easy way to tell whether your fragment is 'created' freshly, or 'restored' from a previous state: by looking at the Bundle savedInstanceState parameter that gets passed in to onCreateView() (and various other life cycle related methods, like onActivityCreate() etc.). More specifically, you will probably want to add something like this to onCreateView(): if (savedInstanceState == null) c

Categories : Android

Dynamically Adding Information to Fragments
When creating a Fragment, create public methods to set data: public class MyFragment extends Fragment { private TextView text1; private TextView text2; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View layout = LayoutInflater.from(getActivity()).inflate(R.layout.simple_list_item_2,container,false); text1 = (TextView) layout.findViewById(R.id.text1); text2 = (TextView) layout.findViewById(R.id.text2); return super.onCreateView(inflater, container, savedInstanceState); } public void setData(String t1, String t2){ text1.setText(t1); text2.setText(t2); } } When adding a fragment in parent activity, give it a unique tag: MyFragment f = new MyFragm

Categories : Android

Adding a Tab with Fragments inside a Tab Fragment
Using a newer version of the Support Library, or native Fragments if you only care about Honeycomb, you can add Fragments as children of other fragments. You can call getChildFragmentmanager() inside one of your top level Fragments and add your child Fragments there.

Categories : Android

Android: ViewPager - adding Fragments
Looks that you imported Fragments from the support package in all the class. The import should be android.support.v4.app.Fragment or android.app.Fragment (if you are targeting API level 11) in all the class

Categories : Android

adding appengine eclipse plugin to ADT eclipse
I have to answer you based on intuition here, but I think you should be able to add GAE plugin to Eclipse you have (With ADT). Just install the plugin from local directory and try doing some basic GAE operations like deploying an app and it should be clear if it works!

Categories : Eclipse

Adding the 'required' attribute with DropDownListFor
Use this: @Html.DropDownListFor(x => x.SelectedValue, new SelectList(Model.SomeList, "Value", "Text"), new {required = "required"}) It won't achieve the shorthand <select required but it should have the same effect. Although I've found you could achieve that exact element using @Html.DropDownListFor(x => x.SelectedValue, new SelectList(Model.SomeList, "Value", "Text"), new {required = (string)null}) Which is a little ugly.

Categories : C#

Eclipse WTP installation fails "Cannot complete the install because one or more required items could not be found"
For Eclipse 4.3 (Kepler), make sure you have the following two update sites: http://download.eclipse.org/releases/kepler/ http://download.eclipse.org/eclipse/updates/4.3

Categories : Java

Adding a required column to a database table
If what you mean by required is NOT NULL then it will set the column to whatever the column DEFAULT value is set to for all 3000 records. If what you mean is a PRIMARY KEY which by default is UNIQUE, then you would have to provide a value for all 3000 records or you could just set the column to AUTO INCREMENT and it will generate values

Categories : PHP

.htaccess redirect by adding parameter if required
To do this you need to use a RewriteCond and the %{QUERY_STRING} before your RewriteRule. It seems that you don't want to Rewrite whenever the query contains the lang parameter therefore you could use a negative RewriteCond such as: RewriteCond %{QUERY_STRING} !(^|&)lang=1($|&) RewriteRule . /index.php [L] With the above, the RewriteCond would fail when the URL already had "lang=1" therefore do not apply the following RewriteRule (which in this arbitary example simply rewrites the request to /index.php but you can tailor that to your specific needs). Your actual rule may be different but the mechanics remain the same, use a RewriteCond and the %{QUERY_STRING}. Hope this helps.

Categories : Htaccess

Dynamically adding required attribute to select element
Let me start out with this isn't pretty, but it works. I tried different ways to get the native directive to work, but to no avail. It looks like by the time this directive executes it is too late. This will look for your data-val-required attribute and add validation to the element. It will trigger all of the same things so myForm.mySelect.$valid will still work as well as myForm.mySelect.$error.required http://jsfiddle.net/TheSharpieOne/knc8p/ var myApp = angular.module('myApp', []).directive('valRequired', function () { return { require: 'ngModel', restrict: 'A', link: function (scope, elm, attr, ctrl) { if (!ctrl || !attr.valRequired) return; attr.required = true; // force truthy in case we are on non input element

Categories : Asp Net Mvc

What is the easiest migration path for db.model when I am adding new required fields?
You don't have to do all that. You simply add the new required field and update all the records that don't have the value2 with a default value. Your application will work without any issues for the entities that don't have the value2 initialized. I would suggest you to add a default value, if possible to have it, so in case you will update other values in the entity without touching the value2 the application will not crash. Also don't forget that if you don't update the old entities (by explicitly editing and storing the value) even if you'll have set the default value if you query on the value2 the old entities won't be included in the result.

Categories : Google App Engine

Prevent auth data in eclipse project from being saved to a repository
You could also store those two string in an encrypted (and ignored by git) file. See for instance "Encrypt Password in Configuration Files? (Java)". Even if that file was somehow pushed... it would still be encrypted.

Categories : Java

eclipse: build path with other projects, how to prevent test src from being included?
Source folders are automatically exported to dependent projects, so I think you're going to have to factor the B project test packages to another test project that depends on the original project B. Ugly, but I can't think of another way to do it.

Categories : Eclipse

How to prevent a lua script from failing when a `require` fails to find the script required?
In Lua errors are handled by pcall function. You could wrap require with it: local requireAllDependenciesCallback = function() testModul = require 'test'; -- Other requires. end; if pcall(requireAllDependenciesCallback) then print('included'); else print('failed'); end Demo Note: pcall is really expensive and should not be actively used. Make sure, you really need to mute require fails.

Categories : Lua

Why does Eclipse's Photran require 'call flush(6)' after 'write' to prevent buffering to std out?
A FORTRAN code will, unless given explicit direction otherwise, write to output "when it feels like it", or when the system feels like allowing it. It's all about buffering. The call to flush is put in here precisely for that reason: The writer wanted to force an output right there, for obvious reasons. However, I have never seen a code that needed a flush in this context. I would experiment with replacing write(*,*) with print *,. ANother possibility might be to compile your code so that output buffering is not allowed. Check the man pages for the appropriate flags, if they exist.

Categories : Eclipse

How to prevent eclipse-link from fetching lazy loaded attributes during DTO mapping?
If your mapper cannot be configured to only map partial objects, then you can create a copy of the persistence object before passing it to the mapper. Either use your own copy method that only copies the desired attributes, or you can use CopyGroups in EclipseLink, http://wiki.eclipse.org/EclipseLink/Examples/JPA/AttributeGroup#Copy_Examples

Categories : Java

Prevent adding token to jQuery-TokenInput
I'd work with the onAdd event, and use the remove function call. Try something along these lines. (It will need debugging, but I think the principle should work.) var list = ["abc","def","xyz"]; var newTI = $("#myTI").tokenInput("search.php", { propertyToSearch: "val", onAdd: function(item){ if ($.inArray(list,item.val)) selector.tokenInput("remove", item); }, });

Categories : Misc

How to prevent adding an empty line to my file?
Do this: sw.Write(now.ToShortDateString()); Here is the MSDN documentation for StreamWriter.WriteLine. Here is the MSDN documentation for StreamWriter.Write. UPDATE: Keep using the WriteLine, but change the way you read your values in from the file: using (StreamReader sr = new StreamReader(path)) { // Initialize to null so we are not stuck in loop forever in case there is nothing in the file to read String line = null; do { line = sr.ReadLine(); // Is this the end of the file? if (line == null) { // Yes, so bail out of loop return; } // Is the line empty? if (line == String.Empty) { // Yes, so skip it continue; } // Here you process th

Categories : C#

Prevent route interpretation when adding parameters to URL
Can your try the option reloadOnSearch:false during intitializing the routes in $routeProvider. See the documentation here

Categories : Javascript

How to prevent adding identical records to SQL database
You could use UNIQUE column constraint or to declare a multiple columns unique constraint you can use UNIQUE () ON CONFLICT : CREATE TABLE name ( id int , UNIQUE (col_name1 type , col_name2 type) ON CONFLICT IGNORE ) SQLite has two ways of expressing uniqueness constraints: PRIMARY KEY and UNIQUE. Both of them create an index and so the lookup happens through the created index.

Categories : SQL



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.