Source Code Option is not showing in Plist - xcode8

In my Xcode 8.3.2 open as source code option is not displaying.

I think Your plist type is Property List Binary
Change type in File inspector
To Default - Property List XMl

Related

PlantUML file in IntelliJ autocomplete and color formatting not working [duplicate]

I have several django projects and several different files with name utils.py, however pycharm treats them as simple .txt files with no syntax highlighting or any other kind of parsing, how can I fix this?
Please see File | Settings (Preferences on Mac) | Editor | File Types.
Look for your file name mapped to the Text type or to the Auto-detect file type by content type.
Remove the incorrect mapping and it will fix the issue.
If you still can't find the wrong mapping in the IDE settings, locate the options/filetypes.xml file in the Configuration directory. Close the IDE and either edit this file to remove the incorrect mapping or delete this file to reset all the file types to the defaults.
You can also use Revert File Type Override / Override File Type file context menu actions.
As CrazyCoder answered, my file also landed in an unintended association. In my case it was "Auto-detect file type by content". You can just try to add your file to the desired file type (e.g. Python) and PyCharm will automatically try to move the association.
FYI, a quick action to reassociate a file's type will be available in the context menu of the Project tool window in IntelliJ IDEA 2021.2 (EAPs should be available publicly around May 2021).
In my case I had to right click the file in question (a django migration) and select Mark as Python.
I probably clicked Mark as Plain Text before by mistake.
I actually solved this by going to the Project section , and then clicking Override File Type by right clicking on the specific file. Then I selected the type of the file from the list of available file types.
That worked
For me, the file somehow forgot its type. This can be overridden by
Right click the file name --> Override File Type --> Select file type.

Edit .blend file's Text only

http://www.blendswap.com/blends/view/73614
I have downloaded this and want to use my own text on it using Blender (or another program). It is not used for commercial purpose. When I open it, I get no option to edit text. I tried edit external and GIMP which failed.
the .blend file is binary and can only be opened inside of Blender, When you create text objects they are displayed as objects inside blender. You should be able to find the object by using the object browser section inside blender and changing it there. You may have to recreate the text object depending on how the author did the original.

Xcode Plist Error

I am generating some plist files for use in an app I am developing, however all of my generated plist files cause the following build error:
Command /Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copyplist failed with exit code 1
However, if I open the plist with the plist property editor and then re-save the plist file, the error goes away. The plist property editor also displays everything correctly. Does the plist editor add some extra metadata to the file or something that xcode requires? Anyone have any ideas?
Might save yourself some time by checking on /usr/bin/plutil used in converting plists from one format to another also has a lint command.
copyplist failed with exit code 1 will occur if you've generated (or hand-crafted) an XML .plist file that doesn't satisfy the plist XML schema. Whitespace shouldn't affect this but misusing the supported tags will.
Using the plist property editor to open and save the file will force the XML into the right format, but long term you'll probably want to isolate the problem and fix your XML generator. (or write an XML-file "fixer" if you don't have control over the XML generated)
Checking you have spare disk space has also been suggested!

How do you edit the Info.Plist file

I'm trying to create a document-based application but the problem is that I don't know how to edit the Info.plist file in order to let the application open certain types of files. I've looked through the apple's "Document-Based Applications Overview" guide to help, but to no avail.
I want my application to open .txt files and .rtf files. My interface only has a simple text view.
Please help. Thanks
Edit:
Every time I compile my code, my app just loads, but it shows an alert panel saying "No Document could be created". And in the log it just says "The public.rtf type doesn't map to any NSDocumentClass."
As for my properties tab, I have "Text Document" for my CFBundleTypeName and "public.rtf" for my LSItemContentTypes.
simply click it in xcode.
you also have the option to show it in source code style (xml-like).
for that right.click in xcode the plist file -> "open as" -> "source code file" (or something like that".
The Document-Based Applications Overview has a section called Storing Document Types Information in the Application's Property List. In that section, they explain how to edit Info.plist so that it lists supported document types. Their example is TextEdit, which opens RTF and plain text files much like what you want.
To open the window depicted in Figure 1, double click your target in the project folder tree (under the Targets section) and select the Properties tab.
in info.plist
in CFBundleDocumentTypes Key add CFBundleTypeName and set its values as extension for example to add support for word file add DOC as its value
There is nice article about it

Graphic image saving in text editor?

I am making a basic text editor from this tutorial here:
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/TextArchitecture/Tasks/TextEditor.html
My text editor can save, write, and open documents in RTF and TXT format, but cannot save graphics along with any text. Formatted text is saved, and the graphic does display when the window is open, but does not get saved.
You're almost there, you just need to implement a bit more in your app's Info.plist.
- (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError
{
NSData *data;
[self setString:[textView textStorage]];
NSMutableDictionary *dict =
[NSDictionary dictionaryWithObject:NSRTFTextDocumentType
forKey:NSDocumentTypeDocumentAttribute];
Notice that in the method which asks for the data to be saved to file, no matter what, it's set up to use NSRTFTextDocumentType rather than NSRTF*D*TextDocumentType. RTFD means RTF with attachments, which saves an .rtfd document which is actually a package/bundle (a folder that is presented to the user as if it were a single file). Saving as NSRTFTextDocumentType will effectively discard the stuff that can't fit into an RTF document, like the images.
After step 12 is the following:
At this stage of its development, your editor opens and saves documents only with an extension of ????. To enable your application to save and open documents with a recognized file type, you need to use Xcode to configure the document types settings in the application’s property list file in the Resources folder in Xcode. (The Xcode template names the file with your project name followed by -Info.plist.) You can edit this file in Xcode by selecting the file in the Groups & Files list and using the built-in editor. Click the disclosure triangles to edit the value of the first item under CFBundleTypeExtensions to the preferred extension for your document files.
For more information about property list files, see “Storing Document Types Information in the Application's Property List” in Document-Based Applications Overview. For complete details about application property lists, see Runtime Configuration Guidelines.
Basically, right now, you're being passed in a generic DocumentType in that data method shown above. Once you claim in your Info.plist that you can handle RTF and RTFD data (as 2 separate entries), you will be passed in a different value in that method, depending on what the user has chosen in the Format popup button in the NSSavePanel. You can check the value of the passed in type and then specify NSRTFTextDocumentType or NSRTFDTextDocumentType accordingly.
You can probably look at TextEdit's Info.plist to use as the basis of your Document types, though be sure to change the NSDocument subclass name to your own so the NSDocumentController knows what class to use.
maybe your images are not saved in the same directory?
for example if I create a rtf document with TextEdit it creates an folder called something.rtfd and contains the TXT.rtf and all the images.