get rid of “cannot find Symbol” error in intelliJ - intellij-idea

Before everything was fine but since some time i get "cannot find Symbol” when i try to compile.
The errors are on my own classes.
If i jump to source and then click the error icon i get this:
But the constructor already exists.
I have no idea of how to get rid of it. I did a lot of searching but none of the solutions like clean worked.
My project is under VCS which i don't really understand (how to set up etc). So maybe it has to do something with that. I only don't know how to get rid of it. Can someone help?
edit:
Here is the zip of the project folder and one folder that includes a library that is used.
I try to compile with build artifacts.
https://dl.dropboxusercontent.com/u/17630770/temp/doekeLibsArchive.zip
I hope someone can give it a try. I would love to continue on this project.

The problem is coming from the fact you have two BezierVertex classes,
a public one nl.doekewartena.path.BezierVertex
and a nested one nl.doekewartena.path.BezierVertexPath.BezierVertex
when you are inside BezierVertexPath, intellij is right nl.doekewartena.path.BezierVertexPath.BezierVertex does not have the constructor shown on your screenshot, it is nl.doekewartena.path.BezierVertex which has it, so you should use the fully qualified name of that class.
Am I missing something ?

Related

IntelliJ recognizes class but "can't access class"

I've used IntelliJ a good bit and never seen this happen. Here's a screenshot I've what I'm seeing. I just started this project, I've tried deleting the problem Vehicle class and putting it back, still has an error. I've tried File -> Invalidate Caches/Restart. Nothing. I've updated to the latest version. Not really sure what to do about it. Any help would be greatly appreciated!
Class attempting to create a Vehicle
Vehicle class

mogenerator doesn't generate the files

I've just installed mogenerator using one of tutorials. I have added run script to my new target, and clicked Cmd+B. I should get some new files, but i didn't. In my .xcdatamodeld i have 2 entities (User and Repos). Below you can find my print screen of my project.
Where is the problem in my thinking? What should i do more? Please, help me, because i haven't found the solution on the web yet.
This all looks fine (judging by your screenshot).
One thing to check - which caused me the same issue - is that, when you've created your Entities in the xcdatamodelId file, make sure that you click on the Data Model Inspector icon, and that each entity has a Name value, and a matching "Class" value.
Miss out the Class name, and nothing will get generated.
Btw, when you click on Build, do you get a "Build succeeded" message ?
Here's the tutorial I followed to get mogenerator working:
RaptureInVenice
I should say, I've used mogenerator in a few projects, and this command line bit is always the piece that gives me trouble. Sometimes, I have to select my xcdatamodelId file, and create a new Version of it, before mogenerator will use it. But once it is working, it's a blessing.
Anything to avoid having to use the needlessly over-complicated CoreData stuff.
Someone should remind Apple that it's 2014...

Package not found but its there

import org.flarrison.scripts.flarrifarm.tasks.livid.DetectLivid;
I'm getting a Package not found error. It doesn't show up as error before i compile. I used the auto completion for it to import. I even clicked CTR-Z until i got back to where the script did run. But it's not now and i have no clue what to do.
Is there any way to get it to recognize it's there? Because it definitely is.
Its telling me that the package "livid" isn't there. BUT IT IS!

"No appropriate method" error generated when calling new function using class-defined object

I defined a class called "FilterCriteria" which has a bunch of function .m files (getAMask, getBMask, etc.) associated with it. When I create the FilterCriteria object and call the functions using it, I don't have any problems. However, recently I added another function (which, on a side note, is almost identical to another function that still works), and Matlab returns the error, "No appropriate method, property, or field getHMask for class FilterCriteria."
I've searched online for this problem, but I can't find anything. The file getHMask.m is definitely in the correct folder, so I don't understand why Matlab seems to have such a problem finding it.
Here's getHMask.m's header:
function mask = getHMask(object, quadrant, channel)
Any help would be greatly appreciated. Thanks in advance.
1) A mistake I make sometimes is not saving the file with the correct name. Make sure capital letters are in the right places etc!
2) Another layer of error checking here... You can call methods('object here') (see here) and make sure it lists the method (function) that you are trying to add to it. If it doesn't show up here you should check into the implementation of the method and make sure it's correctly being added to the class you're using for your object.
I had the same problem that's kind of suggested by Ben's bullet #2 and it was driving me crazy. Turns out MatLab wasn't loading the latest version of my class's m-file. I vaguely remembered it gave me a warning earlier about that, because there were old instances of the class in the workspace and to keep from invalidating them it said it wouldn't update the class until I cleared the workspace...
So if that's the problem, restarting MatLab will work, or you can just enter >> clear

Removing a method call from inside a static lib(.a) without recompiling

I'm using a static lib thats giving me a warning when uploading my binary for review by apple.
The method in the static lib that causes the warning(non-public selectors) is never called by me, its corresponding .h is deleted from my proj, but warning still persists.
Given that I know the method name causing the problem, is there a way for me to open/edit this .a and comment/delete the offending piece of code and then use the modified .a in my project.
I don't have access to the .a source to recompile it, and its very old and the creator of it has no contact details for me to track down.
Many Thanks,
-Cake
Quick and dirty solution: Open the .a file in a hex editor and change all instances of the name. Leave the function name the same length so that offsets in the file don't change, just change a letter or something like that. I did a quick test, adding a dummy function to a subproject we're building as a static library then tweaking the function name in the .a file (there were five instances, for what that's worth) and everything built okay. I don't see any reason it wouldn't pass the App Store check after that.
I'm really surprised the function was still there in the final build, though—I thought Dead Code Stripping was supposed to clean out any unused code. Huh.
http://opensource.apple.com/source/cctools/cctools-809/
I don't presume to get your bounty, because I haven't provided an easy solution. But yes, it in theory is possible. You have your work cut out for you.
There are several solutions, depending on your lib and project.
In your build settings :
Enable "dead code stripping" if possible : If the method is never used (even internally), the symbol will be deleted.
Use "Unexported symbol file" : Simply add the symbol into a file and it will be removed from the binary. This will work even if the symbol is used internally.
Enable "Deployment Postprocessing" and "Strip Linked Product" with "Strip Style" set to "All symbol"
(Not sure) Use "Symbols Hidden by Default". This is related to the code generation and should not affect linking, but just in case everything above failed...
No need to hack the binary files. Just turn off the compiler's "unused selectors" warning: -fno-unused-selectors.