Caveat: I'm not sure if this post might be better suited for SuperUser or some other forum in the SE Family. If you know of a more appropriate place for this post, please let me know, and I will migrate it.
I know that eclipse for Java extends the Ctrl+Left, Ctrl+Right shortcuts to move the cursor within camelCased multiword variable names. This is a feature I really like about eclipse.
However, this feature seems to be absent when I use the PyDev plugin for python programming on eclipse.
Does anyone know how I can get/enable this feature in PyDev (or does it just not exist right now)
Thank you
There is an open feature request for exactly this on PyDev's sourceforge page, see here. I guess this confirms that it "does not exist right now".
The request is originally from 2010 but apparently hasn't received much attention yet. Maybe you can add your voice to the feature request to get it done sooner though.
Related
First and foremost I am very novice to this so I may not understand all technical terms or how to do everything but will try to and ask followup questions if I have. I've been trying to install TiZen studio, which worked fine until I tried to open the package manager. I can open Tizen Studio, but cannot open the package manager. I've tried to redownload latest jdks etc and read that it may also be due to wrongly implemented environment variables, so I tried to set them but nothing works. Error message when trying to open package-manager
My systemvariables looks like these;these are my PATH variables. Am I doing something obvious wrong? I am sorry for the inconvenience, and what environment variables should I set, where and how?
Computer runs on windows 10!
UPDATE: Can't open Tizen studio anymore. Might've happened sometime after I've changed those environtment variables or something. Not sure, and can't make out what the log means. This is the log I got from the last attempted startup. I know it's tons of text, but I have no idea what it means or what to look for, and maybe someone knows what to do or what anything means.
Thanks in advance!
Regards
I had similar issue and stated in this question that later I updated with solution.
For your issues, here's probable solution that might help you.
You need to set JAVA_HOME variable with value of correct version of JDK that Tizen studio supports. This Guide states the requirements.
Let me know if it helped you.
I've just recently become interested in programming, and I want to create Android apps for phones or tablets. I've come a long way in a couple weeks from knowing almost nothing about java/xml. I'm very serious about this. I'm going to find the answer to this question one way or the other. In fact, I hope to have it figured out before anyone answers this. I've fixed many issues without resorting to asking anyone, but I've just been stuck on this issue too long. I figured I'd give this a shot.
I'm using an older tutorial to build a practice twitter app (the tutorials for these seem to be everywhere, which is why I chose it). I'm using Eclipse for an editor.
The following is an example of code from the tutorial. which relates to my question:
#Override
public void onCreate (Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.timeline);
Apparently since the intro of ADT 14, you can no longer use the (R.layout.timeline) phrase, which the error message refers to as a "switch statement."
Now, in a post I found on another site, someone who had a similar issue shows a screenshot of the "quick fix" in Eclipse using ctrl+1. in the screenshot, the fix that pops up says "convert switch to 'if-else' statement." This fix does not pop up in my version of Eclipse. My quick fix options are "migrate Android code", "create field 'timeline' in type 'layout'", "create constant 'timeline' in type 'layout'" or "rename in file."
If I choose "migrate Android code", a window pops up informing me of the ADT 14 update, and how switch statements are no longer allowed in library projects. It says to convert the switch statement to an "if-else" statement by pressing ctrl+1 for the quick fix, then choosing "switch to 'if-else' statement" like it does in the screenshot I found. But again, when I do this, that option does not pop up.
I would much rather know what needs to be changed in the code than know how to make the right quick fix pop up. If it isn't too much trouble, an explanation of why exactly these changes are affective would be very helpful. I have many (MANY) errors in my java files right now, but most of them are due to this exact problem in different forms. If I could see just one before/after example I could probably figure it out from there without an explanation. But after hours of searching, I cannot find that so far by googling.
Thanks so much in advance....
And for the record, I don't see any switch classes in any of my java files, if that makes a difference for the answer...
Make sure you click on the switch keyword itself then press Ctrl + 1.
This confused me at first as well...
If it still doesn't show up, what version of Eclipse are you using?
If you are using a Mac select the keyword switch and click Shift + Command + 1.
That will show a prompt to change switch to if else conditions.
I've been having the same issues. For me, I was switching on view.getId(). Before the switch, declare int id = view.getId();. Then switch in id. Then you can ctrl+1 click and the "Convert Switch to If/Else" should pop up.
They made this change to decrease the build speed. My projects now build in roughly 1/10th of the time. I'm glad I upgraded the ADT.
The issue happens because since ADT 14 resource identifiers are no longer final.
The quick solution you can change switch statements with if-else statements.
With Android Studio 4.1.3
Step:1. Just right click on the switch keyword of statement.
Step:2 Click on the first option Show Context Actions.
Step:3 Click replace switch with if.
Done
To me, it looks like you don't have a timeline resource.
Breaking down R.layout.timeline
R refers to Resources
layout refers to the collection of layouts in your application
and timeline refers the specific resource that you are trying to apply setContentView() too.
If my hunch is correct, you don't have the timeline resource.
Create a new XML file in your layout folder in eclipse and name it 'timeline'
That should resolve the issue.
I hope you got things working.
I agree that this sounds like some weird Eclipse error that is not what it seems, and not what Quick Fix says it is. Eclipse has been known to lie from time to time. Cleaning your project (as #Stephen Dubya said), cutting out the offending code, saving the file, pasting it back in, and saving again...these are some of the non-obvious tricks that sometimes get Eclipse to behave.
In general, I think it would be good for you to get more familiar with some of the Java basics like switch; I think it will make your learning of Android a lot easier. Although the tools and documentation keep improving, Android is still young and not always easy to learn using tutorials, especially when you aren't used to writing code at all or using complicated IDEs like Eclipse.
But I digress. It is only in Android library projects, not regular projects, that Android doesn't treat resources as constants (final variables), since ADT 14. That means means that in library projects, you can't use R.layout.timeline or similar resource variables in your switch statements. You can only switch on whole numbers or enum values.
Using if-else all the time may be your best bet, anyway. switch can, especially for beginners, lead to logic errors in your code, and anything you can write using switch can be rewritten using if-else blocks. Personally, I've stopped using switch in Android and other Java code altogether.
You need to place the curse right before the s in the word switch, and the press cmd 1 . If you switch statements have fall-through clauses, the option to convert won't be available.
Somehow I overworked this error. I have deleted my project from workspace. Reverted it's .project files to old ones commited at SVN. Then at Eclipse uninstalling ADT and install it again. Then import my project. - > Libraries are added the old way and as result all fields at R.java are now final. Hope this helps.
I have no Java experience and prefer Visual Basic; I've found a very nice translation IDE called Basic4android (www.basic4android.com). It works by interpreting a scripting language that's similar to Visual Basic and then using it to generate and compile native Java code. Rather ingenious, if you ask me. In fact I believe I found it from a reference here on StackOverflow.
I'm having some trouble wrapping PayPal's Mobile Payments Library:
www.x.com/community/ppx/xspaces/mobile/mep (scroll down for the HTML Tutorial)
I need to do it in a way that promotes the library's functionality so that B4A can in turn expose it to the Android device (emulator in this case). I've made some halting progress so far, but now I'm stuck on NullPointerExceptions occurring deep within the MPL.
The saga is pretty well described in a thread at their forum:
http://www.basic4ppc.com/forum/additional-libraries-official-updates/8819-looking-download-link.html
Here's my wrapper and the generated code—download here—as only licensed users may access downloads in that particular forum section.
The latest NullPointerException occurs a few calls down from the initWithAppID function. The JD-GUI decompiler reports an internal error when it gets to the com.paypal.android.b.b class, so it doesn't appear to be possible to know exactly what's going on down there.
I'm certain this can be done; I just need to know how to open the proper communication channel between the device and the MPL.
I'm new at Java and I'm new at Android. Quite a combination, wouldn't you say?
It turns out the problem is in the way PayPal bundles their resource files; non-Eclipse projects can't get at them.
More info on the original B4A thread.
Thanks,
Jeff
I think if you ask here about something that generates code for you, you won't be provided with any answers because you can't give any useful source code or something. Also, if you use something like this tool, you never know what it's generating. Also, you can't fix any occurring errors with the generated code... I could go on and on and on...
If you want to use Android the way it's supposed to be used, you'll need to learn Java and Android. If you are good with VB, this shouldn't be that hard. And this is what anyone is going to tell you.
Lately, I've been working on a project in NetBeans using the GUI editor that's built in. Before I noticed that it generated an XML ".form" file that didn't appear in the Project Explorer Pane which makes sense. Earlier I was working on the form in the "Design" tab when it notified me about 15 updates. I just updated without reading anything which was probably a bad idea but when I restarted the IDE, it showed my GUI ".class" file and ".form" file separately in the Project Explorer and I couldn't switch between "Source" and "Design". I also noticed that the generated code that was usually not editable was now editable.
P.S. I'm able to create a new frame just fine and the design editor still works with new frame
I have encounter the same problem and I have solved it.
The key in this problem, I think, is particular plugins for JFrame in Netbeans are not active after updating, so we only need to activate them. The easiest way to achieve this is create a new JFrame class, so in this progress, NetBeans can activate all relevant plugins for us. Finally, restart NetBeans, then everything would be fine.
Thank you very much for all of you that you give me some idea and clues in this situation:)
Work on a similar problem led me to this discussion concerning Guarded blocks inside form Java source file. I'm not sure it's related to your situation, but it may help you recover.
If you are trying to recover the lost state of the backing xml for the form I don't know what to tell you.
This has happened to me, but I tend to highly componentize the forms (break up the forms into little pieces), which makes this not such a big deal. Have you tried the NetBeans forums? You might get better luck there:
http://forums.netbeans.org/
Nevermind, simple solution.
I finally decided that, after plenty of tinkering, to restart the IDE which I should have though of first. The Java SE Plugin must have crashed or something, anyway it's fixed.
Thanks for the help!
Or just right click on the corresponding .form file and select open. The Design tab/editor reestablishes.
I wonder if someone can help me... I've been developing VB.Net for years and C++/VB before that. I've also got some PHP experience. I'm now moving to Java to write an app for my Android mobile. I'm trying to use MOTODev Studio (Which extends eclipse)
I've not developed in Java before so it's a bit of a learning curve anyway. I'm fairly confident I'll be able to work out the important bits but I'm in a new IDE in a new language developing for a new platform.
As I'm new to Java, I was hoping to be able to rely on auto-code generation, intellisense, etc. I'm starting to think this was either very optimistic or I'm using eclipse very poorly.
For example, I know I need to override the OnClickListener() event but am unsure of the exact syntax. In VS, I'd just start typing Override in a class and up would pop intellisense with everything I can override and the appropriate signature, however, in eclipse none of the intellisense options seem to apply when I type public voidor #Override. Is this because I'm doing something wrong/is eclipse intellisense incomplete not very good?
In VS there's a bar at the top of the code page which lists objects in the file on the left and methods of the current object on the right. Does eclipse have an equivalent? If so, where?
I've managed to use the IDE to the extent that I've got a "Hello World" installed on my mob so it's more code generation techniques than windows/dialogues/etc.
I suppose what I really need is for someone to recommend some good resources to help me transition. I'd also appreciate any comments or advice from others that have done similar
Thanks in advance
So you learning three items at once
Language (Java)
Platform (Android)
Tool (Eclipse)
Here are my two cents for each of them:
Java - besides annotations guide already mentioned by Falmarri all java tutorials on oracle site are worth seeing you can find them here
Android - From my point of view very good entering points into android development are Android Developer Dev guide and API Demos project which demonstrates many android aspects ( You can add this project into your workspace in Eclipse via ->New Android Project-> Select from sample ->Choose target version -> Click OK , Voila you have new project in your workspace with a lot of useful android related code, describing many advanced and not so advanced topics). BTW Android developers blog is worth reading but
it usually covers more advanced topics
Eclipse - Falmarri already pointed and pretty good tutorial about Eclipse, I from my side would suggest to start from Help-> Help Contents -> Java Development User Guide
It covers all basic tasks and concepts. For your particular problem with overriding ( actually implementing) an interface method you've to first indicate that your class implements View.OnClickListener via class MyClass implements OnClickListener at this point eclipse will notice that you claiming to implement interface but didn't actually implemented some of it methods ( in this situation onClick(View v)) and will mark class declaration with error marker. Go to your class declaration and press Ctrl + 1 ( also known as "quick fix") and you will get some options to fix broken code. At the other hand if you really want to override parent class method you can press Ctrl + Space in a class body ( e.g not inside the method) and you will get option to override avalible methods.
Hope it helps
http://download.oracle.com/javase/tutorial/java/javaOO/annotations.html
yes, it's the default java perspective. Have you even installed the IDE yet?
http://www.vogella.de/articles/Eclipse/article.html
I'm not entirely sure I fully understand your questions, but if I'm in a Java class in Eclipse that implements some Interface and I want to implement methods I either select the quick fix (Ctrl+1) for the compiler error telling me I'm not implementing the Interface or I trigger content assist (Ctrl+Space) in the class body to get a list of methods to override. And with the bar you mention, do you mean something like the breadcrumb navigation (Alt+Shift+B)?