How to highlight SQL in PyCharm - sql

So I've been messing around with Python using PyCharm (Community Edition), and trying to make something using a database. For this I am using SQLite3.
The program runs just fine, and does what it's supposed to do, but in a lot of tutorials I see the syntax highlighted in colors just as "Def" and "Import" is.
Whenever I write something like """CREATE TABLE""" it does not highlight it even though it runs just fine.
Been trying to figure it out for a while now but can't find an answer.
Tried installing the Database Navigator, which seemed to do nothing for this.
Tried messing around with the settings for PL/SQL (DBN) and SQL (DBN) in the settings under Color Scheme, also nothing.
Tried looking into language injection, but all I could find was people injecting from a list. But my langue injection list is empty and cant find anything on how to populate it. Now it does not even show me the option to inject when I press alt+enter either.
So I'm out of ideas as to what to search for, anyone able to help?

Support for SQL features (highlighting, running SQL from IDE, etc.) is present in (paid) PyCharm Professional Edition only. So you won't be able to have SQL highlighting in PyCHarm Community.
See here for feature comparision: https://www.jetbrains.com/pycharm/features/editions_comparison_matrix.html .

Related

Apex Upgrade 5.1 - 19.1, what is likely to break?

Hi there I'm creating a inventory database system using oracle apex currently my place of employment is using apex 5.1 but are looking to upgrade to the new version (19.1) shortly after my contract ends I'm curious if anyone is aware of anything, in particular, that is going to break or is more likely to break, (ie master detail) so that it can be avoided or documented
From my experience, nothing will "break" (meaning: you won't get any ORA-xxxxx errors), but some things won't work any more (which is maybe even worse; if there was an error, you'd look at it and, possibly, fix it).
The old tabular forms were ugly and kind of difficult to work with. Interactive grid is prettier, but I hate it & try not to use it whenever possible (what do I do, then? Use Interactive report + form). If you decide to upgrade tabular forms into interactive grids, note that code you might have written probably won't work.
Yet another thing: charts. The ones I had in 5.1 simply disappeared in 18.2 (OK, you'll upgrade to 19.1, but nonetheless ...). New charts are beautiful, but it'll take some time to fix them.
Finally, trees. I've used icons which helped users to easily distinguish values that are ON (green icons) from those that are OFF (red icons). In a new version, icons aren't visible any more and everything looks just the same; I have no idea what's ON and what's OFF.
Now, a question for you: why don't you upgrade now, before you create that application? If that isn't possible, consider installing XE database, put Apex 19.1 onto it and develop the application there. When the company you work with does the upgrade, the application should be OK.

Eclipse Generic File Templates

I've seen this question in various guises around the place, but as yet haven't found a suitable answer. If this is a duplicate, appologies (I'd be surprised if it wasn't a duplicate!)
Basically, I have a project which is using (mostly) shell code and sql. I want to make sure all the files have a similar setup, and that I document things consistently. To this end, I want to have template files / skeleton code within Eclipse.
It seems easy enough with Java, but not other file types. I have checked out ShellEd and it didn't appear to have this feature (correct me if I'm wrong).
It would be great to be able to add this as a new file type, such that I can say File -> New -> sh/sql and have the correct basic template with the right header etc.
Also, if possible I would like to be able to, one click, add a function prototype with the correct documentation to my files...
I thought this would be easy enough, but a few days of Googling and messing about, it seems I need to write a plugin of my own... but I can't beleive that it's not possible, more likely my Google skills aren't up to scratch...
any help?
cheers
Rob
P.S I'm normally a Vi (not Vim) user, but have had Eclipse forced upon me!
For SQL the Data Tools Platform Extender SDK (DTP) Eclipse project contains a SQL editor with templates (under Database Development in Install New Software).

Extension Error for Trizetto Facets extension

Hi folks,
I don't know if anyone here can help, but we are at wits' end. We use the Facets product from Trizetto, and I inherited an extension that works fine in production. All I changed was one URL in one method and its overload, and now none of us can run it in either Windows 7 or XP SP3. Debugging it or running the installed extension gives the error shown. The extensions guide (like much of what Trizetto has put out) is pretty useless, and they have no support links or knowledge base online. Has anyone encountered this sort of thing, and can you lead me to any possible solutions?
Trizetto is fairly straight forward for extensions. In this case your custom code is returning an error when Facets attempts to invoke it. Can you run your code outside of Facets and see what happens? A test rig helps here.

VS style snippets in SSMS 2012. Do they exist?

I am trying to setup a simple snippet in SQL Server management studio. When I heard the word "snippet", I assume that they would work like they do in Visual Studio. By that I mean that there are variables that get filled in, etc... I am not seeing that.
Can someone tell me whether SSMS 2012 supports Visual Studio style snippets. If so, can you provide an example of a snippet that supports variable replacement.
This might be close to what your looking for. Under View->Template explorer is a list of a whole bunch of structures that you regularly use when working with, building, developing databases. You can also get to it using Ctrl+Alt+T. There are literally hundreds in there. Everything from building a view to setting up a trigger to creating XML schemas.
The really nice thing with templates is you can build your own structures that you regularly use. I have built quite of few of my own templates to hold snippets that I have acquired from the likes of Brent Ozars blitz scripts and others like the improved SP_WHO from Adam Machanic and such.
While maybe not as fancy (read interactive) as the ones you'll find in the Visual Studio projects I find them very handy.
If you use these templates there is another little feature that can be very handy. If you press Ctrl-Shift-M (or use the toolbar button that shows an A->B) you get a dialog that lets you easily replace the template parameters with your own values.
Update post research into SSMS2012
I just recently started using SSMS 2012 and see there is a new feature that I wasn't aware of. When right clicking you do in fact see the 'Insert Snippet' drop down. I understand your question better now. Apparently however, these are pretty much the same as what I posted above.

How to implement content assist / syntax highlighting?

I'd like to create an IDE for a language and I'm wondering how to implement some features. In particular syntax highlighting and content assist are troubling as they must work even when editor content is not valid (when user is typing syntax hightlight should not disappear just because parser fails).
I am wondering how to approach this problem (and others as well). I've found this: How does code completion work? with a description of a solution to this problem, but it's rather brief.
I can come up with a way to implement all features I want at some point, but I'm not the first one and someone has done it already ;) (and reading source code of Eclipse is not that easy)
So, my real question is there a book discussing problems related with creating IDE? A detailed article discussing how to parse invalid code? Any source of information I should see?
Ah, and by IDE I don't mean a new application, just a set of plugins for eclipse.
The following link will help you further..
Syntax Highlighting:Fast Colored TextBox for Syntax Highlighting
an OpenSource IDE:SharpDevelop
an eBook How to create IDE:[Dissecting a C# Application: Inside SharpDevelop]