In the Design View of a Silverlight page I am getting the following error: -
Property not found
Parameter name: batchGender
at GalaSoft.MvvmLight.ViewModelBase.VerifyPropertyName(String propertyName)
etc....
In the ViewModel there was a property name called batchGender which I have changed to Gender. There are no other occurrences of batchGender anywhere. This is the result of a 'Find in Files' search in VS: -
Find all "batchGender", Subfolders, Keep modified files open, Find Results 1, "Current Project", ""
Matching lines: 0 Matching files: 0 Total files searched: 90
As you can see that string cannot be found anywhere, however the error will not go away. Does anyone have any suggestions as to why the MVVM toolkit thinks this still exists.
Sounds like one of your binaries is outdated, and maybe your project dependencies are incorrect. Try cleaning the entire solution (and if applicable, any dependencies), and then rebuilding.
Related
I need to get the Title of a project rather than the name of it. This can be done using the ProjectSummaryInfoEx method for the application object but I'm not sure how to get this line to return the value I need. Without any commands, it simply opens up the Summary info dialog box, and any inputs I provide come back as an invalid argument.
Any help anyone can provide would be greatly appreciated.
I suggest using:
ActiveProject.BuiltinDocumentProperties("Title")
or a property of the Project object such as:
ActiveProject.Name
References: Application object, Project object, BuiltinDocumentProperties
In addition to Rachel's answers, you can also use this:
ActiveProject.Tasks.UniqueID(0).Name
UID zero will always be the project summary task, and the name property will be the title of the project.
Every so often, I'll open up Sublime Text and my CPU will start going crazy, temperature goes up, and there is this percentage at the bottom right of Sublime Text that slowly updates. I've tried Googling for an answer but to no avail. Does anyone know what the percentage represents? Is it indexing my files or something? How can I update the settings for this?
Yes, the percentage is the indexing status. This can be viewed in more detail from the Help menu -> Indexing Status.... This menu item was added in build 3125.
There are various settings to control indexing, all of which have to go in your User preferences - they currently don't work in Project settings.
Related issues:
https://github.com/SublimeTextIssues/Core/issues/1277
https://github.com/SublimeTextIssues/Core/issues/1338
// File indexing parses all files in the side bar, and builds an index of
// their symbols. This is required for Goto Definition to work.
"index_files": true,
// Set the number threads to use for indexing. A value of 0 will make
// Sublime Text guess based on the number of cores. Use the index_files
// setting to disable all workers.
"index_workers": 0,
// index_exclude_patterns indicate which files won't be indexed.
"index_exclude_patterns": ["*.log"],
// These files will still show up in the side bar, but won't be included in
// Goto Anything or Find in Files
"binary_file_patterns": ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.ttf", "*.tga", "*.dds", "*.ico", "*.eot", "*.pdf", "*.swf", "*.jar", "*.zip"],
As the node_modules folder tends to be massive, this is probably the cause of your indexing taking a while and using lots of system resources. However, at the moment, index_exclude_patterns only applies to file names, so if you want to prevent indexing of the node_modules folder, you will need to add it to binary_file_patterns, which, despite it's name, also operates on folders.
Example:
"binary_file_patterns": ["node_modules/", "*.jpg", "*.jpeg", "*.png", "*.gif", "*.ttf", "*.tga", "*.dds", "*.ico", "*.eot", "*.pdf", "*.swf", "*.jar", "*.zip"]
I have a folder in document library of a site. I want to find all content of that folder. Running following lucene/alfresco-fts query in Node Browser returns No items found:
PATH:"/app:company_home/st:sites/cm:mysite/cm:documentLibrary/cm:MyFolder/*"
Which is wrong, as I have documents in that folder and running same query for different folder returns proper result. Another strange thing is that I cannot get this folder: following query also returns No items found:
PATH:"/app:company_home/st:sites/cm:mysite/cm:documentLibrary/cm:MyFolder"
Also if I get content of document library then MyFolder is skipped in the results and subfolder is returned:
PATH:"/app:company_home/st:sites/cm:mysite/cm:documentLibrary/*"
Name | Parent
--------------|---------------------
cm:MyFolder2 | /app:company_home/st:sites/cm:mysite/cm:documentLibrary
cm:MySubfolder| /app:company_home/st:sites/cm:mysite/cm:documentLibrary/cm:MyFolder
I have checked the aspects and properties of MyFolder and they are the same as MyFolder2. I do not have any custom behaviours/rules/etc.
How can I make first lucene query work and return content of MyFolder?
Try updating metadata on the folder so Solr re-indexes it. You could also get its db id and then tell solr to re-index it by db id. If it has over 1000 children, a FTS query may fail. - Known issue. Try using a txmd query.
I would suggest you to get the node ref of the folder from folder details page and search in node browser. There you can get the primary path. Please cross verify the path you use to search using lucene or use that primary path to search for the folder in lucene search.
Another possibility is that the locale property(sys:locale) of the folder(MyFolder) will be different from the locale of your browser. Please check whether the locale of MyFolder and the other folders for which result is shown, are same or not. If not that can also be a reason.
In my project Mockito.times(1) is often used when verifying mocks:
verify(mock, times(1)).call();
This is redundant since Mockito uses implicit times(1) for verify(Object), thus the following code does exactly what the code above does:
verify(mock).call();
So I'm going to write an a structural search drive inspection to report such cases (let's say, named something like Mockito.times(1) is redundant). As I'm not an expert in IntelliJ IDEA structural search, my first attempt was:
Mockito.times(1)
Obviously, this is not a good seach template because it ignores the call-site. Let's say, I find it useful for the following code and I would not like the inspection to trigger:
VerificationMode times = Mockito.times(1);
// ^ unwanted "Mockito.times(1) is redundant"
So now I would like to define the context where I would like the inspection to trigger. Now the inspection search template becomes:
Mockito.verify($mock$, Mockito.times(1))
Great! Now code like verify(mock, times(1)).call() is reported fine (if times was statically imported from org.mockito.Mockito). But there is also one thing. Mockito.times actually comes from its VerificationModeFactory class where such verification modes are grouped, so the following line is ignored by the inspection:
verify(mockSupplier, VerificationModeFactory.times(1)).get();
My another attempt to fix this one was something like:
Mockito.verify($mock$, $times$(1))
where:
$mock$ is still a default template variable;
$times$ is a variable with Text/regexp set to times, Whole words only and Value is read are set to true, and Expression type (regexp) is set to (Times|VerificationMode) -- at least this is the way I believed it should work.
Can't make it work. Why is Times also included to the regexp? This is the real implementation of *.times(int), so, ideally, the following line should be reported too:
verify(mockSupplier, new Times(1)).get();
Of course, I could create all three inspection templates, but is it possible to create such a template using single search template and what am I missing when configuring the $times$ variable?
(I'm using IntelliJ IDEA Community Edition 2016.1.1)
Try the following search query:
Mockito.verify($mock$, $Qualifier$.times(1))
With $Qualifier$ text/regexp VerificationModeFactory|Mockito and occurrences count 0,1 (to find it when statically imported also).
To also match new Times(1) you can use the following query:
Mockito.verify($mock$, $times$)
With $times$ text/regexp .*times\s*\(\s*1\s*\) and uncheck the Case sensitive checkbox.
I am new to plugin development and I am writing/ extending a Eclipse plugin. I have initially text file which contains the reults of a code review with the following data.
**line_from=70=** **line_to=80=** **date=2012/11/20 10:32:54=** **reviewer=ccc=** **responsible=xx=** **revision_nr=1.40=** **offset=1458=** **length=344=**
Based on some condition, I say that line number 70 to 80 is same as 100 to 110. Now I want to add a Marker and highlight the lines from 100-110, but I dont have the offset for this location. Can somebody tell me how to get the offset from the line numbers.
Thanks
I think it's too late to answer you, but
maybe I can help anyone else with the same problem.
To solve this, you can use the IDocument Interface.
IDocument document = (IDocument) MyPlugin.getEditor().getDocumentProvider().getDocument(MyPlugin.getEditor().getEditorInput());
So the document will load the file that was opened in the editor.
You just need to use the getLineOffset() method, that returns the offset of the line.